Score:0

Using Apache ProxyPass to point to express server?

in flag

I'm trying to use proxypass for a specific directory so I can point it to my express.js server https://othersite.life:1447/

Been stuck on this one for hours now. Would really appreciate some insight.

I have enabled these mods and I'm editing /sites-enabled conf file.

proxy
proxy_http
proxy_connect
proxy_ftp
<VirtualHost 117.123.133.207:80>
        ServerName s33d.cf
        ServerAlias www.s33d.cf
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/s33d.cf
SSLProxyEngine on
<Directory /var/www/html/s33d.cf>
        Options -Indexes +FollowSymLinks
        AllowOverride All
LogLevel warn
    </Directory>
        ErrorLog error.log
RewriteEngine on
ProxyRequests Off
ProxyPreserveHost On
RewriteCond %{SERVER_NAME} =www.s33d.cf [OR]
RewriteCond %{SERVER_NAME} =s33d.cf
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
ProxyPass /var/www/html/s33d.cf/node https://othersite.life:1447/
    ProxyPassReverse /var/www/html/s33d.cf/node https://othersite.life:1447/
</VirtualHost>

The domain s33d.cf works fine but when I go to s33d.cf/node it doesn't use the proxypass settings. Both sites are hosted on same server.

I get no errors as far as I can tell.

in flag
Please don't replace your question with the answer, you are invalidating the existing answers with that. Instead, post your solution as an answer and accept it when you can. Otherwise the question will stay in the system as unsolved forever.
Score:0
cn flag
Bob

ProxyPass is followed by a URI path , not a directory/file system path. Your current config is for mapping http://www.s33d.cf/var/www/html/s33d.cf/node and not for mapping http://www.s33d.cf/node/ to https://othersite.life:1447

Instead use

ProxyPass /node/ https://othersite.life:1447/

But you’re redirecting all requests to https so whatever else is configured in your plain http VirtualHost block is probably irrelevant….

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.