Proxy and site on same port with Apache 2.2
2012-04-28 18:21
387 查看
# sites-enabled/site NameVirtualHost *:80 <VirtualHost *:80> ServerName site.com </VirtualHost> # sites-enabled/proxy <VirtualHost *:80> #ServerName not important ProxyRequests On </VirtualHost>
When using Debian style sites-enabled, make sure Proxy site goes BEFORE actual site in alpha order, i.e. 00proxy vs site
Reason:
Proxy requests having "Host" field set to destination site, i.e. google.com or anything. This will result in matching none of the VirtualHosts' ServerName, and will go to First VirtualHost regardless of ServerName
settings.
相关文章推荐
- Configure PHP and Django (Python) to run on the same Apache site.
- How to Install Apache Tomcat 8 (on Windows, Mac OS X, Ubuntu) and Get Started with Java Servlet Prog
- How To Setup a Rails 4 App With Apache and Passenger on CentOS 6
- HOW TO RUN YOUR WEB SERVER AND MQTT WEBSOCKETS BROKER ON THE SAME PORT
- .JBOSS 4.3.0 EAP Clustering with multiple instances running on Same machine balanced with Apache HTT
- HOW TO RUN YOUR WEB SERVER AND MQTT WEBSOCKETS BROKER ON THE SAME PORT
- Running PHP(Apache) and ASP.NET(IIS) at port 80 at the same time
- 关于Apache: [warn] _default_ VirtualHost overlap on port 80, the first has precedence Error and Solution的解决方案
- 解决Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
- Drupal 6 Clean URL configuration on Windows XP and Apache 2.2(依此实现Clean URL)
- Manual install on Windows 7 with Apache and MySQL
- Hosting Multiple Service Implementations On The Same Port With WCF
- Configure Puppet Master with Passenger and Apache on Centos
- Error applying site theme: A theme with the name "Jet 1011" and version already exists on the server.
- Up and running with Apache Spark on Apache Kudu
- How to Install PHP 7 with Apache and MariaDB on CentOS 7/Debian 8
- IIS7 and Apache on the same machine by Steve Schofield
- MariaDB Galera Cluster with HA Proxy and Keepalived on Cents 6
- ZuulProxy fails with “RibbonCommand timed-out and no fallback available” when it should do failover
- Apache Hadoop YARN: Moving beyond MapReduce and Batch Processing with Apache Hadoop 2