Apache Setup Setup Apache is open source Web server software and is the most commonly used Web server. Apache is commonly used in UNIX systems and has a version of the Windows platform. This paper takes the Windows platform as an example to introduce the method of installation and configuration of Apache. Because Apache does not support ASP, it is recommended that you use win Server + IIS if your site uses ASP. Install Apache one, download the Windows platform Apache can download at this URL: Http://nagoya.apache.org/mirror/httpd/binaries/win32/Apache version The front has two branches: 1.3.x and 2.0.x. Beginners can use the 1.3.x. This paper takes 1.3.x as an example. The above Web site contains the latest version of two branches. Please select the download for installation files with suffix "EXE" or "MSI". Second, install and run the download of the Apache file, you can start installation. The Apache installation process is simple. You only need to set the following window:
Enter fields in "network Domain". If you use the site's level two domain name, such as "user.dns0755.net", please enter "Dns0755.net". If you use the top-level domain name, enter "XXX.com". Enter the server name in the "server name". If you use the site's two-level domain name, please enter your domain name "user.dns0755.net". If you use the top-level domain name, enter "Www.xxx.com". Enter the email address of the webmaster in the "Administrator's email addresses". In addition, all the options in the installation process are available with the default options. III, run 1, Win 9x: apache installed, will be in the "Start"-> "program" to add a "Apache HTTP Server" group. Enter the group, select "Control Apache Server"-> "Start" to start Apache. 2. Win nt/2000/xp/2003 in these systems, Apache installed with the default option, in addition to adding a "Apache HTTP Server" group to the "Start"-> "program", It also adds an Apache service to the system's services. The service is set to run automatically when the system starts. Configure Apache One, configuration file apache is a background running program, no interface. All configurations are included in the configuration file. The main configuration file is: c:\program files\apache group\apache\conf\httpd.conf If you want to modify the Apache configuration, you can edit the configuration file with any text editing tool, such as Notepad. In the configuration file, the line that starts with "#" is the comment line. II, configuration options The main options in the configuration file are as follows: &nbsP #Listen 3000
#Listen 12.34.56.78:80 Apache IP address and port. In general, you do not need to set up, Apache will be bound to all of the local IP address on the 80 port. Port Apache ports. The default value is 80. ServerName user.dns0755.net The name of the Web server. The "Server Name" entered at installation is saved here. DocumentRoot "C:/Program Files/apache Group/apache/htdocs" This is the root directory of the Web site. If you want to store the Web site files in the "D:\myweb" directory, you can change the directory behind DocumentRoot to "D:/myweb." Options Indexes FollowSymLinks MultiViews for security reasons, please delete the "Indexes" above. Otherwise, other people can browse to all the files in your website. DirectoryIndex index.html Default First name. When you enter an address in the browser (for example, http://user.dns0755.net/), Apache looks for the default home file to open. If you want to configure multiple default first-page file names, separate them with spaces. scriptalias/cgi-bin/"C:/Program files/apache group/apache/cgi-bin/" The CGI file storage path. Third, Advanced Configuration
1, set the virtual directory in the configuration file to find the following line: <ifmodule mod_alias.c> Add the following below this line: alias/vdir/"c:/comexe/" <directory "c:/comexe/" >
Options MultiViews
AllowOverride None
Order Allow,deny
Allow from all
</Directory> by accessing the http:// user.dns0755.net/vdir/, you can access the contents of the C:\comexe\ directory. The apache default opens two virtual directories: "/icons/" and "/manual/". These two virtual directories are not available and can be deleted in the configuration file. 2, how to resolve the Chinese web page display garbled (1) in the configuration file to find the line containing "AddLanguage" or "Addcharset", add one line to the front of these lines: adddefaultcharset GB2312 (2) Develop good habits, add this line to