1

I have a meteor application running on port 3000. I can successfully connect to the program with www.myurl.com:3000, but would rather connect to it via www.myurl.com/myappname. I started with the instructions on this web site: http://www.andrehonsberg.com/article/deploy-meteorjs-vhosts-ubuntu1204-mongodb-apache-proxy and I have the following Apache configuration file:

<VirtualHost *:80>
     ServerName myurl.com
     ProxyRequests off
             <Proxy *>
                    Order deny,allow
                    Allow from all
             </Proxy>
           <Location />                                                         
             ProxyPass http://localhost:3000/
             ProxyPassReverse  http://localhost:3000/
         </Location>

</VirtualHost>

I do not know how to continue from here to get the program on www.mysite.com/myapp. In other situations, I would use an Alias within the Apache configuration file, but that doesn't seem like the right direction to go in this case.

How do I configure Apache to send port 3000 to www.myurl.com/myapp?

user223470
  • 11
  • 1
  • 2

1 Answers1

1

Try change the <Location /> to <Location /myapp/>. See this page for documentation.

Snippet:

ProxyPass

This directive allows remote servers to be mapped into the space of the local server; the local server does not act as a proxy in the conventional sense, but appears to be a mirror of the remote server. The local server is often called a reverse proxy or gateway. The path is the name of a local virtual path; url is a partial URL for the remote server and cannot include a query string.

When used inside a <Location> section, the first argument is omitted and the local directory is obtained from the <Location>. The same will occur inside a <LocationMatch> section, however ProxyPass does not interpret the regexp as such, so it is necessary to use ProxyPassMatch in this situation instead.

masegaloeh
  • 17,978
  • 9
  • 56
  • 104