homepage Welcome to WebmasterWorld Guest from 54.167.10.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Virtual Host showing 403 error
mack




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

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.

 

JD_Toims




msg:4631651
 11:23 pm on Dec 17, 2013 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved