- 論壇徽章:
- 0
|
由于服務(wù)器需要用到JSP和PHP兩種語(yǔ)言,所以我用了Apache的Pxory_ajp功能進(jìn)行了tomcat的整合。
Php主要用來(lái)運(yùn)行discuz論壇,例如域名為http://bbs.test.com 運(yùn)行正常,并且rewriet功能正能。
tomcat主要運(yùn)行網(wǎng)站的主要頁(yè)面,例如域名為 http://www.test.com 運(yùn)行正常,但是文件名的后綴為*.jsp,我希望所以頁(yè)面的內(nèi)容顯示為
*.html,讓搜索引擎更好的搜錄。但是更重要的功能是希望可以實(shí)現(xiàn)
二級(jí)域名。
比如:http://www.test.com/index.html 顯示的為 http://www.test.com/index.jsp
http://001.test.com/index.html顯示的為 http://www.test.com/user.jsp?id=001
下面是我的服務(wù)器的一些配置文件的內(nèi)容,
請(qǐng)高手指點(diǎn),說下有什么好的解決辦法。謝謝!
Apache 2.2.3的httpd.conf內(nèi)容如下:
<Directory "/var/www/bbs">
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/web">
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
Apache 2.2.3的httpd-vhosts.conf內(nèi)容如下:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin test@163.com
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ServerName www.test.com
ErrorLog logs/www.test.com-error_log
CustomLog logs/www.test.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin test@163.com
DocumentRoot d:/server/web/bbs
ServerName bbs.test.com
ErrorLog logs/bbs.test.com-error_log
CustomLog logs/bbs.test.com-access_log common
</VirtualHost>
tomcat 5.5.20的server.xml配置文件如下:
<Host name="www.test.com">
<Valve className="org.apache.catalina.valves.AccessLogValve" fileDateFormat="yyyy-MM-dd" prefix="www_test_com_access_log."
suffix=".txt"/>
<Context crossContext="true" docBase="/var/www/web" path="" reloadable="true">
</Context>
</Host> |
|