2

I have a raspberrypi with nginx as reverse proxy, and another machine with nginx (for owncloud) and apache (phpbb).

The redirect to nginx works but not the redirect to apache, instead it redirects me to owncloud. I think that for a reason apache does not "respond" to the nginx proxy and so the nginx proxy use the first vhost in alphabetical order instead This is not a firewall problem, I have checked the ports with nmap Also I can access apache directly with local_ip:8080 and it work.

-

The vhost of the nginx proxy :

owncloud : http://pastebin.com/G6Q6fiKz

phpbb : http://pastebin.com/Keb5t4gt

-

apache : phpbb vhost :

<VirtualHost *:8080>
    #ServerName forum.spooky4672.me
    DocumentRoot /var/www/phpbb

    ErrorLog ${APACHE_LOG_DIR}/forum_error.log
    CustomLog ${APACHE_LOG_DIR}/forum_access.log combined
</VirtualHost>
0

The short answer is: Name-based virtual hosts do not work with SSL. As the SSL connection is negotiated before the client starts talking "names" with the server.

The options for your internet-facing nginx proxy are:

  • Use a distinct IP address for each secure server
  • Use a distinct port for each secure server
  • Use one server name, but divide your services into separate locations
  • There is something called SNI, but I have not tried it

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.