ServerAdmin webmaster@bjp51.net
DocumentRoot /var/bjp51.net
ServerName www.bjp51.net
</VirtualHost>
ubuntu中配置虚拟主机怎么就错了呢?谁帮我看下应该怎么配置
5 个解决方案
#1
如何使用ubuntu配置网站域名呢?
#2
怎么错了 ?
#3
哎 再看下吧 我改成这样了 但老是访问出403错误
<VirtualHost *:80>
DocumentRoot /var/imatesclub.com/
ServerName test.imatesclub.com
<Directory "/var/imatesclub.com/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/imatesclub.com/
ServerName test.imatesclub.com
<Directory "/var/imatesclub.com/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#4
<VirtualHost *:80>
DocumentRoot /var/www/html/bp51.net/
ServerName www.bp51.net
<Directory "/var/www/html/bp51.net/">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
这样的代码就行了
#5
DocumentRoot /var/imatesclub.com/
DocumentRoot /var/www/html/bp51.net/
glad you figured this out by yourself.
If you check the config file for you httpd at /etc/httpd/conf/httpd.conf
you will find the default document root for the whole web server is:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
if the virtual host root you set up has conflict with this, you may get a 403. This is a good precaution for preventing any illegal access to the files that don't belong to the website...
DocumentRoot /var/www/html/bp51.net/
glad you figured this out by yourself.
If you check the config file for you httpd at /etc/httpd/conf/httpd.conf
you will find the default document root for the whole web server is:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
if the virtual host root you set up has conflict with this, you may get a 403. This is a good precaution for preventing any illegal access to the files that don't belong to the website...
#1
如何使用ubuntu配置网站域名呢?
#2
怎么错了 ?
#3
哎 再看下吧 我改成这样了 但老是访问出403错误
<VirtualHost *:80>
DocumentRoot /var/imatesclub.com/
ServerName test.imatesclub.com
<Directory "/var/imatesclub.com/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/imatesclub.com/
ServerName test.imatesclub.com
<Directory "/var/imatesclub.com/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#4
<VirtualHost *:80>
DocumentRoot /var/www/html/bp51.net/
ServerName www.bp51.net
<Directory "/var/www/html/bp51.net/">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
这样的代码就行了
#5
DocumentRoot /var/imatesclub.com/
DocumentRoot /var/www/html/bp51.net/
glad you figured this out by yourself.
If you check the config file for you httpd at /etc/httpd/conf/httpd.conf
you will find the default document root for the whole web server is:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
if the virtual host root you set up has conflict with this, you may get a 403. This is a good precaution for preventing any illegal access to the files that don't belong to the website...
DocumentRoot /var/www/html/bp51.net/
glad you figured this out by yourself.
If you check the config file for you httpd at /etc/httpd/conf/httpd.conf
you will find the default document root for the whole web server is:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
if the virtual host root you set up has conflict with this, you may get a 403. This is a good precaution for preventing any illegal access to the files that don't belong to the website...