Forum Moderators: phranque

Message Too Old, No Replies

Nginx Reverse Proxy to Apache

         

agriz

5:02 pm on Mar 14, 2012 (gmt 0)

10+ Year Member



I have added nginx.
It is working good with apache.

But I want to now run two sites on single server
How do i do this with apache and nginx?

Can you please share the configurations for apache and nginx to host multiple site on same server?

phranque

12:10 am on Mar 15, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



on apache you can do this by specifying virtual hosts in your configuration.

Apache Virtual Host documentation:
http://httpd.apache.org/docs/2.0/vhosts/ [httpd.apache.org]

agriz

5:48 am on Mar 15, 2012 (gmt 0)

10+ Year Member



i just did. I am getting something like this.

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 s1.server1.com (/etc/httpd/conf.d/ssl.conf:74)
*:8080 is a NameVirtualHost
default server www.server1.com (/etc/httpd/conf/httpd.conf:1017)
port 8080 namevhost www.server1.com (/etc/httpd/conf/httpd.conf:1017)
port 8080 namevhost www.server2.com (/etc/httpd/conf/httpd.conf:1025)
Syntax OK