UbuntuApacheFastCGI virtual host installation record: 1cp/etc/apache2/sites-available/default/etc/apache2/sites-available/www.linuxidc.com here www.linuxidc.com is the configuration file of the VM (of course, the file name can be arbitrary) 2. Edit the configuration file in & lt; VirtualHost *: 80 & gt;
Ubuntu Apache FastCGI virtual host installation record:
1 cp/etc/apache2/sites-available/default/etc/apache2/sites-available/www.linuxidc.com
Here www.linuxidc.com is the configuration file of the VM (of course, the file name can be arbitrary)
2. Edit the configuration file in Directly add
ServerName www.linuxidc.com
The domain name of the VM is www.linuxidc.com;
Delete this line at the same time: (the fastcgi mode is used. If this mode is not used, this operation is not required)
FastCgiExternalServer/usr/lib/cgi-bin/php5-fcgi-host 127.0.0.1: 9000-idle-timeout 120-pass-header Authorization
Otherwise, an error will be reported when you restart apache. The content is:
FastCgiExternalServer: redefinition of previusly defined class "/usr/lib/cgi-bin/php5-fcgi" Action 'configtest' failed.
3. Enable this configuration file.
A2ensite www.linuxidc.com
4. Restart apache
Service apache2 reload
If the restart fails, the following message is displayed: apache2: cocould not reliably determine the server's fully qualified linuxidc name, using 127.0.1.1 for ServerName,
You can modify the/etc/apache2/httpd. conf file (this file is generally empty) and add the following sentence:
ServerName localhost
Restart and then OK.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2