[CentOS] Virtual Hosts question

Steven Tardy sjt5atra at gmail.com
Fri Feb 7 02:30:48 UTC 2014


On Thu, Feb 6, 2014 at 11:54 AM, Joseph Hesse <joehesse at gmail.com> wrote:

>
> ============== httpd.conf ==============
> ServerName 192.168.0.99
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>   ServerName IDoNotExist.com
>   DocumentRoot /var/www/html
>   DirectoryIndex Index.html index.html
> </VirtualHost>
>
> <VirtualHost *:80>
>   ServerName X.com
>   ServerAlias www.X.com
>   DocumentRoot /var/www/wordpress
>   DirectoryIndex Index.html index.html index.php Index.php
>   CustomLog logs/access_log_custom common
> </VirtualHost>
> ============== httpd.conf ==============
>
> ========Tail of error.log ==================
> [Thu Feb 06 10:26:01 2014] [error] [client 24.118.254.66] Directory
> index forbidden by Options directive: /var/www/wordpress/
> ============== error.log ==============
>


update your httpd.conf...
  http://httpd.apache.org/docs/2.2/mod/core.html#options

 ============== httpd.conf ==============
ServerName 192.168.0.99

NameVirtualHost *:80

<Directory /var/www/wordpress>
 Options Indexes FollowSymLinks
</Directory>

< VirtualHost *:80>
  ServerName IDoNotExist.com
  DocumentRoot /var/www/html
  DirectoryIndex Index.html index.html
< /VirtualHost>

< VirtualHost *:80>
  ServerName X.com
  ServerAlias www.X.com <http://www.x.com/>
  DocumentRoot /var/www/wordpress
  DirectoryIndex Index.html index.html index.php Index.php
  CustomLog logs/access_log_custom common
< /VirtualHost>
============== httpd.conf ==============



More information about the CentOS mailing list