Welcome to WebmasterWorld Guest from 174.129.135.89

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Virtual Host showing 403 error

   
10:31 pm on Dec 17, 2013 (gmt 0)

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



A couple of years ago I created a simple script to make it quick and easy to create local domain names for developing sites locally on my system.

For example if I was working on example.com I would create a local site called example.loc

It is a simple php script. Fill out a form and it creates the rest. I type example.loc it checks I havenít already created this domain, if not it stores in in mysql (to prevent dupes).

It then creates the vhost entry in a file called vhosts.conf this file is included into my httpd.conf

It also edits the host file to point the newly created domain to localhost.

It was working fine for years until I did a fresh install on kuduntu. Now when I install my script I get a 403 error for the default domain www.loc.loc (this is the page used to "register" loc domains on the system.

The local sites are all stored in the following location /Home/User/Documents/Websites

It then creates website1 website2 etc etc depending on the name chosen...

It then creates the following on vhosts.conf


<VirtualHost *:80>
ServerName www.site1.loc
DocumentRoot /home/mack/Documents/Websites/site1
</VirtualHost>


In hosts I have the following...


127.0.0.1 www.site1.loc


The permissions on the hosts file and vhosts.conf are 777 to allow it to be appended to every time a new domain is added (bad I know) :)

I just donít understand the 403 forbidden message, it's even worse knowing I wrote the script and cant get it to install.. Hope someone has a few ideas I can try.

Mack.
11:23 pm on Dec 17, 2013 (gmt 0)

WebmasterWorld Senior Member Top Contributors Of The Month



I just donít understand the 403 forbidden message, it's even worse knowing I wrote the script and cant get it to install..

I would guess it could be this:

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch20_:_The_Apache_Web_Server#Table_20-1_SELinux_Security_Context_File_Labels