Reputation: 279
What would be the cleanest way to run an opa app on port 80 :
Thanks
Kayhman
Upvotes: 2
Views: 455
Reputation: 143
Here's what I do on my apache/vhost server to run an Opa app on just one domain. It requires mod_proxy on your apache server.
Configure the virtualhost within apache as follows:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/domains/example.com/www/htdocs
ErrorLog /var/log/apache2/www.example.com-error_log
CustomLog /var/log/apache2/www.example.com-access_log common
ProxyPreserveHost On
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/
</VirtualHost>
This forwards all requests to example.com to the opa server running on port 8081.
Upvotes: 2
Reputation: 1994
You can use:
Authbind
to start your app directly on port 80 via a non-privileged usernginx
or haproxy
. Upvotes: 3
Reputation: 4771
Option 3: use a reverse proxy such as nginx (Apache would be overkill here) and leave opa on port 8080.
Upvotes: 2