On Thu, Aug 22, 2024 at 11:54 AM bruce <badoug...@gmail.com> wrote:

> Hi.
>
> I'm testing out a github site. I had posted most of this awhile ago,
> and it had appears to work. However, something is amiss/screwing up on
> my part. In other words, FUBAR!
>
> Instead of getting the site content, getting the directory index.
>
>
> The test app:
>  https://github.com/berat/waitlist-landing-page
>  It's a node app that I'm running -- http://127.0.0.1:3000
>  and using "pm2" and reverse proxy with apache2 to serve the page.
>
>  The test url is -->> http://161.35.5.174/berat (if it were to work,
> as it did for a bit)
>
> The docroot
>  /var/www/html/berat
>
> config file
>  /etc/apache2/berat.conf
>  cat berat.conf
>
> <VirtualHost *:80>
>     ServerAdmin f...@yahoo.com
>     ServerName  temp22
>     ServerAlias temp
>
>     DocumentRoot   /var/www/html/berat
>
>  RewriteEngine On
>
>      ProxyPass /berat http://127.0.0.1:3000
>      ProxyPassReverse /berat http://127.0.0.1:3000
>
>  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\&amp;w=1920\&amp;q=75|\.\./public/hero1|i"
>
>
>     <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
>
>             Options +FollowSymLinks   +MultiViews
>             AllowOverride 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>
>
> for the above berat.conf file, I tested the following as well
>
>      ProxyPass /berat/ http://127.0.0.1:3000/
>      ProxyPassReverse /berat/ http://127.0.0.1:3000/
>
>      ProxyPass /berat/ http://127.0.0.1:3000/
>      ProxyPassReverse /berat http://127.0.0.1:3000
>
>      ProxyPass "/berat" http://127.0.0.1:3000";
>      ProxyPassReverse "/berat" http://127.0.0.1:3000";
>
>      ProxyPass "/berat/" http://127.0.0.1:3000/";
>      ProxyPassReverse "/berat/" http://127.0.0.1:3000/";
>
>      ProxyPass "/berat/" http://127.0.0.1:3000/";
>      ProxyPassReverse "/berat" http://127.0.0.1:3000";
>
>      ProxyPass / http://127.0.0.1:3000
>      ProxyPassReverse / http://127.0.0.1:3000
>
> the process was
>  a2dissite berat
>  a2ensite berat
>
>  systemctl reload apache2
>
>  at the same time, from the /var/www/html/berat
>   the "pm2" is stopped/restarted
>
>   "stop"
>   rm -rf /root/.pm2
>   ls -al /root/.pm2
>   pkill -f PM2
>   ps -aux | grep -i "PM2"
>
>   "restart"
>     sudo -u www-data pm2 start npm --name "waitlist-landing-page" -- start
>     curl http://127.0.0.1:3000
>
>  at this point, the "pm2" server is generating the content, which
> should be displayed via apache/server
>
>
> Any/all pointers (frank!!) will be tested.
>
> For the life of me, I can't seem to get this to work. I've
> looked/rechecked the past email threads, but I'm still missing
> something.
>
> ps. The test process is running on a throwaway digitalocean
> instacne/ubuntu.
>
> thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>
If you request http://temp22/berat/foo, that will translate to
http://127.0.0.1:3000/berat/foo

If you request http://temp22/berat/, that will translate to
http://127.0.0.1:3000/berat/

The absence of pathinfo parameters might be triggering the directory index
here, unless you see a httpd directory index and the backend server isn't
even reached; confirm what is happening first.

Reply via email to