LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-08-2012, 01:06 PM   #1
B-Rye
LQ Newbie
 
Registered: Apr 2012
Posts: 14

Rep: Reputation: Disabled
Apache VHosts problem - under time constraints.. please help


Having some trouble adding some vhosts.

I took over this server from someone just to do some web stuff for a company. they want me to add a couple more domain names and do the websites.

looking at his httpd.conf I can see where he has added all the other vhosts and they work, but yet a simple copy/paste and edit of the names doesn't seem to work for me.


when i goto website2 i get the generic "Great Success ! Apache is working on your cPanel® and WHM™ Server" message.

if I add the /index.html i get

Forbidden You don't have permission to access /index.html on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_bwlimited/1.4 PHP/5.2.9 Server at website2.com Port 80



here is the code he has that works.. i simply figured replaced website1 with website2 and restarting httpd should do the trick.. unfortunately it is not and I am so frustrated as to why.


Code:
<VirtualHost ipaddress:80>
    ServerName website1.com
    ServerAlias www.website1.com
    DocumentRoot /home/website1/public_html
    ServerAdmin webmaster@website1.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/website1.com combined
    CustomLog /usr/local/apache/domlogs/website1.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User website1 # Needed for Cpanel::ApacheConf
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup website1 website1
    </IfModule>
    ScriptAlias /cgi-bin/ /home/website1/public_html/cgi-bin/
</VirtualHost>
Any help would be greatly appreciated as I am under time constraints to get this going for the client.

Thanks in advance!
 
Old 04-08-2012, 01:42 PM   #2
leslie_jones
Member
 
Registered: Sep 2011
Posts: 130

Rep: Reputation: Disabled
What do the logs say - particularly the error log?
 
Old 04-08-2012, 02:36 PM   #3
B-Rye
LQ Newbie
 
Registered: Apr 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Code:
[Sun Apr 08 15:31:01 2012] [crit] [client *myip] (13)Permission denied: /home/*website2/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
 
Old 04-08-2012, 03:30 PM   #4
B-Rye
LQ Newbie
 
Registered: Apr 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
It's definitely something to do with the directory I am trying to setup the new domain on.

If I change DocumentRoot to /home/website1/public_html it works
but /home/website2/public_html does not

what do I need to do to setup this directory properly?
 
Old 04-08-2012, 03:52 PM   #5
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by B-Rye View Post
Code:
ensure it is readable
 
Old 04-08-2012, 04:19 PM   #6
B-Rye
LQ Newbie
 
Registered: Apr 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
lol.. exact same r/w permissions on both website1 and website2 folders and files.. i think i've triple checked that already.. and obviously just cause.. did it again now
 
Old 04-08-2012, 05:02 PM   #7
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Specifically focus on the .htaccess file. does it even exist?

The "Forbidden" apache error suggests being denied by the webserver rather than the filesystem.
 
Old 04-08-2012, 08:00 PM   #8
B-Rye
LQ Newbie
 
Registered: Apr 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
yes it does exist

actually what i just tried was copying the entire website1 into website2 folder including the .htaccess file

still no go and I have no idea why

why does apache not like this users folder?

Last edited by B-Rye; 04-08-2012 at 08:01 PM. Reason: addon
 
Old 04-08-2012, 10:11 PM   #9
B-Rye
LQ Newbie
 
Registered: Apr 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
not sure what I did but I have permissions now.. Still having an issue with vhosts but I will start a new thread for it here.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] All apache vhosts work except one.. help! mattca Linux - Server 1 08-20-2010 09:17 PM
Apache: Vhosts Issue SpiDeRBlTE Linux - Software 4 05-27-2006 09:23 PM
Help with Vhosts in apache please. GEEF Linux - Software 2 10-29-2004 07:18 PM
apache 2.0.44 vhosts sqn Slackware 4 06-19-2003 12:54 AM
Vhosts on RH 8.0 - Apache 2.0.40 Drogo Linux - Software 5 02-06-2003 11:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration