reverse proxy setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

Testing a github app that appears to use/require reverse proxy to
display results on the browser.

The basic app uses npm/nextjs to generate content, Per different
sites, the process uses PM2 to run the process, and to be able to show
the content via an internal/local "server". This is accessed via  --
http://127.0.0.1:3000.

Using curl on the local/test server, content can be accessed via the site
 curl  http://127.0.0.1:3000.

My issue now, is how to create the Apache conf to be able to have the
user at http://1.2.3.4/berat, be able to display the content. This
requires somehow setting up the reverse proxy process, in the VirtHost
of the config file. The test site is being run from a subdir
  /var/www/html/berat <<<

Researching/testing hasn't had the light go off yet!

Here's what I've got, but it's not correct.

Pointers would be useful. (and possible explanation!)

cat /etc/apache2/sites-available/berat.conf
<VirtualHost *:80>
    ServerAdmin foo@xxxxxxxxx
    ServerName  temp22
    ServerAlias temp

    DocumentRoot   /var/www/html/berat

    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *>
        Require all granted
    </Proxy>

    ProxyPreserveHost On

    <Location "/berat">
      ProxyPreserveHost Off
      ProxyErrorOverride Off
    </Location>

     #ProxyPass        /api/system-a/
https://external-domain.example2.org/system-a/

     ProxyPass /berat http://127.0.0.1:3000/

     ProxyPassReverse /berat http://127.0.0.1:3000/


    #DocumentRoot   /var/www/html/berat


    <Directory    /var/www/html/berat>

            #ProxyRequests Off
            #ProxyPreserveHost On
            #<Proxy *>
            #  Require all granted
            #</Proxy>

            #ProxyPass / http://127.0.0.1:3000/

            #ProxyPassReverse / http://127.0.0.1:3000/

    #        DirectoryIndex index.html index.php

    #        Options -Indexes +FollowSymLinks +MultiViews
            Options +FollowSymLinks

            AllowOverride All
            Require all granted
            ##Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All Require all granted


            ##Options Indexes FollowSymLinks MultiViews
            ##Options -Indexes FollowSymlinks
            #Options FollowSymlinks
            #AllowOverride All
            ##Order allow,deny
            ##allow from all
            #Require all granted
    </Directory>

    ##Alias "/berat" "/var/www/html/berat/"


    LogLevel debug
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux