apache做反向代理时,如何记录其访问日志?
回复: apache做反向代理时,如何记录其访问日志?
for apache 2
from:
http://knowledge.oscc.org.my/solution-a ... directives
from:
http://knowledge.oscc.org.my/solution-a ... directives
A sample configuration from MDKP.GOV.MY Apache web server using the combination of ProxyPass and ProxyPassReverse for achieving "shared" port 80.
As we already know , Apache mainly runs at port 80 and while it does sometimes runs on diffrent port depend on it's configuration. Well here in MDKP (Local Council Of Kuala Pilah) faces a major problem. We want to run web server using internal hosting and also we're gonna have another server which called E-Aduan Awam (E-Public Complaint System) and both of these server runs Apache on the same port! that is port 80. This is due to the lack of Static IP since we can't afford yet to own a leased line with Static IP bundle with it. Right now we have to endure with 1 Static Public IP using SDSL connection from Telekom Malaysia. So here's the snippet of Apache 2.2.x on what we've already implement using Virtual Host container and the combination of ProxyPass and ProxyPassReverse Directives.
代码: 全选
<VirtualHost 10.10.10.2:80> ServerName www.mdkp.gov.my ServerAdmin [email protected] DocumentRoot /home/webmaster/public_html/ CustomLog /var/log/httpd/access_log combined </VirtualHost>
代码: 全选
<VirtualHost 10.10.10.2:80> ServerName eaduan.mdkp.gov.my ProxyPass / http://eaduan.mdkp.gov.my/ ProxyPassReverse / http://eaduan.mdkp.gov.my/ CustomLog /var/log/httpd/access_log combined ErrorLog /var/log/httpd/error_log </VirtualHost>
代码: 全选
<VirtualHost 10.10.10.2:80> ServerName penguin.mdkp.gov.my ProxyPass / http://penguin.mdkp.gov.my/ ProxyPassReverse / http://penguin.mdkp.gov.my/ CustomLog /var/log/httpd/access_log combined ErrorLog /var/log/httpd/error_log </VirtualHost>
在线用户
正浏览此版面之用户: 没有注册用户 和 0 访客