LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2006, 10:23 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
403 You don't have permission to access /index.html on this server.


Hi!

I have apache2 running on solaris 10. Everything worked fine until I made a test today: I wanted to change the IP and the hostname of the server. Then I tried to look at the web-page and I got the Message
Quote:
Forbidden You don't have permission to access /index.html on this server.
.
So I copied my original conf-files back, and... the message remains!
I checked all the config-files: I didn't forget anything. I restarted the server and apache quite a lot of time but without any change.
the error log-file says:
Quote:
[warn] NameVirtualHost XXX.XXX.XX.XX:0 has no VirtualHosts
I don't understand why it says
Quote:
XXX.XXX.XX.XX:0
and not
Quote:
XXX.XXX.XX.XX:80
.
In httpd.conf I only had changed the IP and hostname and changed it back afterward. So I can't figure out whay I get this message now.
I can remmber that I had the same problem as I configured apache for the first time. And then it suddenly worked without any apparent reason.

I would really appreciate any help.

Here the interesting parts of my httpd.conf:
Quote:
DocumentRoot "/space/servers/http/docs"
#DocumentRoot "/space/servers/http/docs/"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "/var/apache2/htdocs">
<Directory /space/servers/http/docs">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
Quote:
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
NameVirtualHost XXX.XXX.XX.XX
<VirtualHost *:80>
ServerName myserver.com
DocumentRoot /space/servers/http/docs
Alias myalias /space/servers/http/el/docs
</VirtualHost>

Last edited by xpucto; 06-02-2006 at 10:25 AM.
 
Old 06-02-2006, 04:03 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
NameVirtualHost XXX.XXX.XX.XX
<VirtualHost *:80>
Change this to:
Code:
NameVirtualHost *
<VirtualHost *>
 
Old 06-03-2006, 11:49 AM   #3
huanvnn
LQ Newbie
 
Registered: May 2006
Posts: 20

Rep: Reputation: 0
that's right
 
Old 06-06-2006, 06:36 AM   #4
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by bathory
Change this to:
Code:
NameVirtualHost *
<VirtualHost *>
Thanks. I do not have any warning any more, but I still get the message "forbidden". I really can't understand that: I didn't change anything regarding permissions!
Does anyone have any suggestion?
 
Old 06-06-2006, 07:18 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Take a look at the error_log to find out why you get this error, i.e. where is apache looking for that index.html
BTW, how did you changed the IP in solaris 10? Because you have to change the IP in /etc/inet/ipnodes in addition to /etc/hosts
 
Old 06-06-2006, 07:46 AM   #6
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by bathory
Take a look at the error_log to find out why you get this error, i.e. where is apache looking for that index.html
BTW, how did you changed the IP in solaris 10? Because you have to change the IP in /etc/inet/ipnodes in addition to /etc/hosts
there is no error in the error_log.
I changed the following files:
/etc/hosts
/etc/nodename
/etc/inet/hosts
/etc/hostname.bge0

I had forgotten /etc/inet/ipnodes. Are there any other files that I forgot?
But the thing is that I got everything back like before as It still worked.

apache looks in the correct folder. I created a file with chmod 777 and it worked! So there is a problem with the permissions. I'll have a look at it right now, but I still do not understand because I didn't change anything regarding permissions!
 
Old 06-06-2006, 09:19 AM   #7
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
I changed the user and the group in httpd.conf. Now it works. I just don't understand why it first worked and then not anymore.
 
  


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
index.html is not noticed in /var/www/html xviddivxoggmp3 Red Hat 1 04-23-2006 06:30 PM
you don't have permission to access / on this server dus3d Linux - Software 5 04-18-2006 11:43 PM
index.html ronraj Linux - Newbie 8 06-16-2005 04:54 PM
Konqueror + file:/usr/share/doc/HTML/index.html jon_k Linux - Software 2 11-25-2003 05:06 AM
You don't have permission to access / on this server jaydave Linux - Networking 1 03-15-2003 06:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:08 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