Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
sorry for bothering you, but i'm next to jumping out of my 6th floor window.
---
i got the following problem
---
----------------------------------------------------------------------------------
by the browser request
wow.test.now and test
===> Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.40 Server at wow.test.now(test) Port 80
----------------------------------------------------------------------------------
by the browser request
nbnbg252 and 192.168.1.252
===> the main ServerRoot index.html is ok
----------------------------------------------------------------------------------
---
After my last changes to establish name based vhost my conf looks like that
---
----------------------------------------------------------------------------------
/etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.1.252
<VirtualHost 192.168.1.252>
DocumentRoot /var/www/html
Servername nbnbg252.localhost
ServerAlias nbnbg252
</VirtualHost>
<VirtualHost 192.168.1.252>
DocumentRoot /home/myhome/www
ServerName wow.test.now
ServerAlias test
ScriptAlias /cgi-bin/ "/home/myhome/www/cgi-bin/"
</VirtualHost>
----------------------------------------------------------------------------------
drwxrwxrwx 11 apache apache 4096 9. Aug 23:19 www
and below the
-rwxrwxrwx 1 apache apache 76 9. Aug 23:19 index.html
-----------------------------------------------------------------------------------
drwxr-xr-x 4 apache apache 4096 9. Aug 23:31 html
and below the
-rwxr-xr-x 1 apache apache 4105 6. Aug 00:04 index.html
----------------------------------------------------------------------------------
/etc/hosts at the server
127.0.0.1 nbnbg252.localhost wow.test.now nbnbg252
(there was a "test" alias, but i think there is no need to it)
----------------------------------------------------------------------------------
---
additional (don't know if that does matter?)
---
----------------------------------------------------------------------------------
/etc/hosts and C:\\WINNT\system32\drivers\etc\hosts at the clients
192.168.1.252 wow.test.now nbnbg252 test
----------------------------------------------------------------------------------
drwx------ 32 myuser myuser 4096 9. Aug 23:54 myhome
myuser were switched out of an old_myuser
myhome is the copied content of old_myhome
----------------------------------------------------------------------------------
tp wijnands: what did you exactly mean with:
Does it work on the server itself?
the deamon is up, i checked via ssh the logs error/access and the respond
to stickman
"Can you get to /index.html or any other index page?"
I get my main index page
DocumentRoot /var/www/html
"If yes, look for these terms in your httpd.conf: Options Indexes"
I read in the apache.org tutorial something about its more save not to use
Options Indexes!?
So i deleted these entries.
I tried it with Options Indexes in the "/" , but there was no difference.
i can allways see the nbnbg/192.168.1.252
but never the test/wow.test.now
here is my actuall setting on Directories
# important to security
<Directory "/">
Options FollowSymlinks
AllowOverride None
</Directory>
# DocRoot Directives
<Directory "/var/www/html">
Options IncludesNoexec FollowSymLinks
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
<Directory "/var/www/icons">
Options MultiViews
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
<Directory "/var/www/cgi-bin">
Options ExecCGI
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
# VHost Directives
<Directory "/home/myhome/www">
Options IncludesNoexec FollowSymLinks Multiviews
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
<Directory "/home/myhome/www/cgi-bin">
Options ExecCGI
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
i opened mozilla via ssh and tried to reach my sites (Preferences - proxy - direct connection)
"192.168.1.252" - was the main DocumentRoot => ok
"test" was redirected to www.test.com, which i didn't wanted to go, the alias seems not to be ok, could be because of the missing /etc/hosts entry?
wow.test.now, "The connection was refused when attempting to connect to wow.test.now", the vhost is not ok
nbnbg252, the same as with wow.test.now, the alias to my main address is not ok, i could only reac id via IP
access_log noticed the ip of the server
error_log gives me new [Tue Aug 10 15:03:08 2004] [error] [client 192.168.1.32] (13)no permission: access to / denied
Originally posted by winslow to stickman
"Can you get to /index.html or any other index page?"
I get my main index page
DocumentRoot /var/www/html
"If yes, look for these terms in your httpd.conf: Options Indexes"
I read in the apache.org tutorial something about its more save not to use
Options Indexes!?
So i deleted these entries.
What do you have specified for the DirectoryIndex in your httpd.conf? Does it match the index page that you expect to use? If you don't have a matching index page in that directory and you are not using "Options Indexes", then your server is exhibiting the correct behavior.
Also are the permission on /home/myhome set to 700 or some other setting that restricts access to other?
What do you have specified for the DirectoryIndex in your httpd.conf? Does it match the index page that you expect to use? If you don't have a matching index page in that directory and you are not using "Options Indexes", then your server is exhibiting the correct behavior.
Also are the permission on /home/myhome set to 700 or some other setting that restricts access to other?
i have in all DocumentRoot directories an index.html with at least 755
in the case of the vhost DocumentRoot (while testing) i have 777
to the directorie and the index.html
Quote:
"and you are not using "Options Indexes", then your server is exhibiting the correct behavio"
please could you go in more detail, i don't understand that point
where have this "Options Indexes" to be,
<Directory "/">
or
<Directory "/var/www/html">
or
<Directory "/home/myhome/www">
or not at all in a <Directory "/foo/bar">
Originally posted by winslow i have in all DocumentRoot directories an index.html with at least 755
in the case of the vhost DocumentRoot (while testing) i have 777
to the directorie and the index.html
Ok, so you have /home/myhome/www set to 777, but what are the permissions on /home/myhome? You need to make sure that whatever user your Apache runs as can read the directory tree to your DocumentRoot (ie /home, /home/myhome, and /home/myhome/www). Redhat usually creates user directories with default perms of 700 which means apache or www can't read the contents of them.
The "Options Indexes" is a feature that when their is no matching index present and the directory is requested, it will present a file list as the index page. This is a security concern if you do not want the contents of that particular directortory presented.
Ok, so you have /home/myhome/www set to 777, but what are the permissions on /home/myhome? You need to make sure that whatever user your Apache runs as can read the directory tree to your DocumentRoot (ie /home, /home/myhome, and /home/myhome/www). Redhat usually creates user directories with default perms of 700 which means apache or www can't read the contents of them.
/home was allready setted to 755
/home/myhome was setted to 700 is now 755
/home/myhome/www was setted to 777 is now 755
and it was a small step to mankind but a big to myself,
the clients(not the server) get access to the vhost, thanks a lot to stickman
there are some minor problems left
I get results only when my browser preferences are setted to Proxy - Direct connection
Any ideas what to tell the squid proxy to ignore these intranet requests???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.