Java项目标路径为:/var/data/www/m.qcai360.com/
Java项目标域名为:m.qcai360.com
PHP项目标路径为:/var/www/html/
PHP项目标域名为:www.qcai360.com
[root@localhost~]#vi/etc/httpd/conf/httpd.conf
翻开编纂Apache的设置文件,找到VirtualHost节点,往失落#正文。中心代码以下:
[html]viewplaincopyprint?
- NameVirtualHost*:80
- <VirtualHost*:80>
- DocumentRoot/var/www/html
- ServerNamewww.qcai360.com
- ErrorLoglogs/www.qcai360.com-error_log
- CustomLoglogs/www.qcai360.com-access_logcommon
- </VirtualHost>
- <VirtualHost*:80>
- ServerNamem.qcai360.com
- ErrorLoglogs/m.qcai360.com-error_log
- CustomLoglogs/m.qcai360.com-access_logcommon
- <Directory"/var/data/www/m.qcai360.com/">
- DirectoryIndexindex.htmindex.jspindex.html
- </Directory>
- DocumentRoot/var/data/www/m.qcai360.com/
- <IfModulemod_proxy.c>
- ProxyPass/ajp://127.0.0.1:8009/
- ProxyPassReverse/ajp://127.0.0.1:8009/
- </IfModule>
- </VirtualHost>
复制代码
- NameVirtualHost*:80<VirtualHost*:80>DocumentRoot/var/www/htmlServerNamewww.qcai360.comErrorLoglogs/www.qcai360.com-error_logCustomLoglogs/www.qcai360.com-access_logcommon</VirtualHost><VirtualHost*:80>ServerNamem.qcai360.comErrorLoglogs/m.qcai360.com-error_logCustomLoglogs/m.qcai360.com-access_logcommon<Directory"/var/data/www/m.qcai360.com/">DirectoryIndexindex.htmindex.jspindex.html</Directory>DocumentRoot/var/data/www/m.qcai360.com/<IfModulemod_proxy.c>ProxyPass/ajp://127.0.0.1:8009/ProxyPassReverse/ajp://127.0.0.1:8009/</IfModule></VirtualHost>
[root@localhost~]#vi/usr/share/tomcat6/conf/server.xml
翻开编纂Tomcat的设置文件,我把几个中心节点设置展现下,其他节点几近不必修改。
Connector节点:
[html]viewplaincopyprint?
- <Connectorport="8888"protocol="HTTP/1.1"
- URIEncoding="UTF-8"
- minSpareThreads="25"
- maxSpareThreads="75"
- enableLookups="false"
- disableUploadTimeout="true"
- connectionTimeout="20000"
- acceptCount="300"
- maxThreads="300"
- maxProcessors="1000"
- minProcessors="5"
- useURIValidationHack="false"
- compression="on"
- compressionMinSize="2048"
- compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"
- redirectPort="8443"/>
复制代码
- <Connectorport="8888"protocol="HTTP/1.1"URIEncoding="UTF-8"minSpareThreads="25"maxSpareThreads="75"enableLookups="false"disableUploadTimeout="true"connectionTimeout="20000"acceptCount="300"maxThreads="300"maxProcessors="1000"minProcessors="5"useURIValidationHack="false"compression="on"compressionMinSize="2048"compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"redirectPort="8443"/>
Host节点:
[html]viewplaincopyprint?
- <Hostname="m.qcai360.com"appBase="/var/data/www/m.qcai360.com/"
- unpackWARs="true"autoDeploy="true"
- xmlValidation="false"xmlNamespaceAware="false">
- <Contextpath="/"docBase="/var/data/www/m.qcai360.com/"reloadable="true"caseSensitive="false"debug="0"></Context>
- </Host>
复制代码
- <Hostname="m.qcai360.com"appBase="/var/data/www/m.qcai360.com/"unpackWARs="true"autoDeploy="true"xmlValidation="false"xmlNamespaceAware="false"><Contextpath="/"docBase="/var/data/www/m.qcai360.com/"reloadable="true"caseSensitive="false"debug="0"></Context></Host>
扫瞄器中输出:http://www.qcai360.com/
运转效果以下:
扫瞄器中输出:http://m.qcai360.com
运转效果以下:
欢迎光临 仓酷云 (http://ckuyun.com/) | Powered by Discuz! X3.2 |