分页: 1 / 1

apache做反向代理时,如何记录其访问日志?

发表于 : 2011-12-09 17:01
qinjuan
在使用apache做反向代理时,如何记录其访问日志?

回复: apache做反向代理时,如何记录其访问日志?

发表于 : 2011-12-15 17:03
qinjuan
apache做反向代理时,如何记录其反向代理的日志?

回复: apache做反向代理时,如何记录其访问日志?

发表于 : 2011-12-15 21:07
leo
for apache 2
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>