Use apache reverse proxy setting external WWW and file server
Http://www.lelew.com/ 2004-05-10 13:05:14
Introduction: One machine is connected to the Internet as a firewall, there is a WWW server on the internal network segment (Redhat 6.1, Apache 1.3.9) I hope this machine can provide WWW servers and Apache-based file services. For external world public access to WWW servers, or foreign branch downloads needed files. Advantages: The internal WWW server and file service are completely separated from the outside world. It is not directly connected to the outside. Apache service running on the firewall provides internal agent access, enhances security, and the Apache service running on the firewall The name-based virtual host technology allows the homepage on the firewall to not be accessed. It meets the provisions of the Firewall to run the service. Implementation: Apache Server (192.168.11.2) on the internal network segment is stored in the company's home page, for internal and external users public access, and set the / home / ftp / pub directory as a file storage area, with http: // Downloadload .yourdomain.com / pub / to access. Set Apache reverse proxy technology on the firewall, which is accessed by the firewall proxy on the internal network segment. Steps: 1. Apache server on the internal network segment Sets Apache uses the default configuration. The main directory is / home / httpd / html, the host domain name is Sun.YourDomain.com, and is named www.yourdomain.com, and set the SRM.conf plus a line of alias as follows: Alias / Pub / Home / FTP / PUB / change the default application type is defined as follows: DefaultType application / octet-stream added at the end of a definition Options Indexes AllowOverride AuthConfig order allow the /etc/httpd/conf/access.conf in, deny allow from all Note: Options Indexes allow not find The directory / file list is allowed to list the Index.html file. Allowoverride Authconfig allows for basic username and password verification. In this way, you need to put it in / home / ftp / pub directory. HTACCESS, the content is as follows: ------- [Root @ Shopu Pub] # more .htaccess Authname Branch Office Public Software Download Area Authtype Basic Authorfile / Etc / .usrpasswd require valid-user ------ then uses #htpasswd -c /etc/.usrpasswd user1 to create different user names and passwords that allow access / PUB subsequent file services.