ubuntu中配置虚拟主机怎么就错了呢?

songfuqiang 2014-11-18 05:56:56
<VirtualHost *:80>
ServerAdmin webmaster@bjp51.net
DocumentRoot /var/bjp51.net
ServerName www.bjp51.net
</VirtualHost>

ubuntu中配置虚拟主机怎么就错了呢?谁帮我看下应该怎么配置
...全文
184 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
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...
songfuqiang 2014-12-22
  • 打赏
  • 举报
回复


<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>
这样的代码就行了
songfuqiang 2014-11-21
  • 打赏
  • 举报
回复
哎 再看下吧 我改成这样了 但老是访问出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>
hzyd_ 2014-11-19
  • 打赏
  • 举报
回复
怎么错了 ?
songfuqiang 2014-11-19
  • 打赏
  • 举报
回复
如何使用ubuntu配置网站域名呢?

19,613

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧