Welcome to WebmasterWorld Guest from 54.234.244.30

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Virtual Host showing 403 error

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

Moderator from GB 

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

joined:June 15, 2001
posts:7557
votes: 3


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)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:July 19, 2013
posts:1097
votes: 0


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
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members