ubuntu14.04apache2域名绑定设置
2016-07-18 本文已影响88人
拉肚
1、cd /etc/apache2/sites-available/
增加文件,输入如下内容
<VirtualHost *:80>
ServerName Test.com
ServerAlias *.Test.com
DocumentRoot /home/linwen/Apache2Workspaces/www/html/bailinong-server-v2/public
Options Indexes FollowSymLinks
AllowOverride All
Require all grantedErrorLog
${APACHE_LOG_DIR}/error.logCustomLog
${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
2、sudo gedit /etc/apache2/sites-available/000-default.conf
在最后面导入
IncludeOptional sites-available/linuxidc.conf
3、打开etc/hosts
127.0.1.1 Test.com