On Fri, Jul 26, 2024 at 6:14 PM bruce <badoug...@gmail.com> wrote:
> Hi, for those who have followed my attempts, thanks. This is a trimmed > down attempt. > > Found some additional examples, and managed to get the following to > "work", once! > > Not sure why it stopped, but I now get a 403/Fobidden err. error.log > inspection shows > ///// > Cannot serve directory /var/www/html/berat/: No matching > DirectoryIndex (index.html,index.cgi,index.pl > ,index.php,index.xhtml,index.htm) > found, and server-generated directory index forbidden by Options > directive > //// > Which is odd.. as the PM2 server doesn't create any of these file > types as far as I can tell. > > I think I did a > "systemctl stop apache2" > "systemctl start apache2" > to test > and after the "start", the 403 was displayed. > > Here's the test vhost. The initial apache2.conf is the default with no > changes. > > The test site that has the 403 is > http://161.35.5.174/berat > > The working test site is.. > http://198.211.116.12/berat > > the berat_h.conf file is > <VirtualHost *:80> > ServerAdmin f...@yahoo.com > ServerName temp223a > ServerAlias temp3a > # > # > https://medium.com/@unishubh1/production-ready-node-js-using-reverse-proxy-smartscribs-2cf95e58e002 > # > # as test.. run from html2 berat_h > # all other apps are in html > # this is the same as the "clone" vhost > #jul25/24 > #stripped out > DocumentRoot /var/www/html/berat > > #test for styles.. > #does order matter??? -- the actual ip is used to test.. > > > # > > > #RewriteEngine On > > #test frm web > ProxyRequests Off > ProxyPreserveHost On > ProxyVia Full > > ## gets the 200 code for the content.. > ProxyPass /berat http://127.0.0.1:3000/ > ProxyPassReverse /berat http://127.0.0.1:3000/ > > #test > > #ttest substitute below > #RewriteEngine On > SetOutputFilter INFLATE;proxy-html;SUBSTITUTE;DEFLATE; > ProxyHTMLInterp On > ProxyHTMLExtended Off > > > AddOutputFilterByType SUBSTITUTE text/html > Substitute "s|/_next/static/|\.\./\.next/static/|" > > # Substitute > "s|/_next/image?url=\%2Fhero.jpg\&w=1920\&q=75|\.\./public/hero1|i" > Substitute > > "s|/_next/image\?url=\%2Fhero.jpg\&w=1920\&q=75|\.\./public/hero1|i" > > > #EnableSendfile off > # test above > > > #DocumentRoot /var/www/html/berat > > > <Directory /var/www/html/berat> > > #Header Set Pragma "no-cache" > #Header Set Expires "Thu, 1 Jan 1970 00:00:00 GMT" > #Header Set Cache-Control "max-age=0, no-store, no-cache, > must-revalidate" > #Header Unset ETag > #FileETag None > > > # DirectoryIndex index.html index.php > > # Options -Indexes +FollowSymLinks +MultiViews > Options -Indexes +FollowSymLinks > > #AllowOverride All > AllowOverride None > #Options -MultiViews > #i think or 2.4 Order allow,deny > #i think for 2.4 Allow from all > > #use for 2.4? > Require all granted > > </Directory> > > LogLevel debug > ErrorLog ${APACHE_LOG_DIR}/error.log > CustomLog ${APACHE_LOG_DIR}/access.log combined > </VirtualHost> > > OK.. WTH!!!! > > Just retried the err srvr.. and the page is now showing...!!! > So something is happening that's not in the conf file? > > Could it be some cache thing? Some node/PM2 thing? Some timing thing? > Something else?? > > I'm completely at a loss to explain this behaviour. > > thanks > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > > You need to match the trailing slashes when proxying/redirecting.