Guest sas Posted December 4, 2002 Report Share Posted December 4, 2002 i've set up the apache-mdk server (with php support) + mysql and webmin. My computer has no network connection. For some reason i get a "forbidden to access /" whenever i try to access the site using http://localhost. The file permissions on the folder containing the files and the files thereselves i've changed to be world readable to make sure it wasn't that. The apache faq gives a fix to this problem it says there might be something wrong in the /etc/apache/conf/mod.conf or some file like that. The thing it suggests might be wrong in this file is that it'll have a line reading <file > when it should read a lot more. I havn't got this line at all. Should i try inserting it? and where should i try putting it if so? Quote Link to comment Share on other sites More sharing options...
Guest anon Posted December 4, 2002 Report Share Posted December 4, 2002 Im no expert on this, but should't it be http://localhost:10000 Quote Link to comment Share on other sites More sharing options...
Guest LinuxExplorer Posted December 4, 2002 Report Share Posted December 4, 2002 Hmm. This is all presuming you're using Apache 1.3.26 which normally comes with MDK9.0 and not one of the Apache 2.x releases. Well, normally the actual files that the Apache server points to are located in /var/www/html unless you've changed it in your /etc/httpd/conf/commonhttpd.conf file. In other words, look for a segment that looks like this: # # This should be changed to whatever you set DocumentRoot to. # <Directory /var/www/html> # # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # Options -Indexes FollowSymLinks MultiViews Also make sure that the /etc/httpd/conf/httpd.conf includes the line DocumentRoot /var/www/html for it to recognize that default directory for Apache. Also, to make sure the directory and files have the correct permissions, open up a console, go into SU, enter your pass then type in chmod -R 0755 /var/www/html Also, make sure there isn't an .htaccess file in the directory. There shouldn't be since this is a fresh install from what I've gathered, but just in case. If all else fails, point your browser directly to a specific file. IE http://localhost/index.html If that works and just going to http://localhost doesn't, then search for this line in the commonhttpd.conf : # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.php index.html index.php3 index.shtml index.cgi index.pl index.htm Default.htm default.htm </IfModule> This is what it will default to when it looks at the default directory. Hope that's enough info. If all else fails, you can copy what the contents of your config files are so we can all look at it to find the error. Quote Link to comment Share on other sites More sharing options...
SoulSe Posted December 4, 2002 Report Share Posted December 4, 2002 Im no expert on this, but should't it behttp://localhost:10000 This is only for connecting to Webmin (or whatever you have on port 10000), webmin usually uses this port. Quote Link to comment Share on other sites More sharing options...
Guest anon Posted December 4, 2002 Report Share Posted December 4, 2002 Im no expert on this, but should't it behttp://localhost:10000 This is only for connecting to Webmin (or whatever you have on port 10000), webmin usually uses this port. Thanks, I have learn't something. Quote Link to comment Share on other sites More sharing options...
SoulSe Posted December 4, 2002 Report Share Posted December 4, 2002 No problem. BTW if you connect to webmin you need to use https:// instead of just http:// Webmin uses secure http. Quote Link to comment Share on other sites More sharing options...
Guest sas Posted December 6, 2002 Report Share Posted December 6, 2002 Hmm. This is all presuming you're using Apache 1.3.26 which normally comes with MDK9.0 and not one of the Apache 2.x releases. Well, normally the actual files that the Apache server points to are located in /var/www/html unless you've changed it in your /etc/httpd/conf/commonhttpd.conf file. In other words, look for a segment that looks like this: # # This should be changed to whatever you set DocumentRoot to. # <Directory /var/www/html> # # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # Options -Indexes FollowSymLinks MultiViews Also make sure that the /etc/httpd/conf/httpd.conf includes the line DocumentRoot /var/www/html for it to recognize that default directory for Apache. Also, to make sure the directory and files have the correct permissions, open up a console, go into SU, enter your pass then type in chmod -R 0755 /var/www/html Also, make sure there isn't an .htaccess file in the directory. There shouldn't be since this is a fresh install from what I've gathered, but just in case. If all else fails, point your browser directly to a specific file. IE http://localhost/index.html If that works and just going to http://localhost doesn't, then search for this line in the commonhttpd.conf : # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.php index.html index.php3 index.shtml index.cgi index.pl index.htm Default.htm default.htm </IfModule> This is what it will default to when it looks at the default directory. Hope that's enough info. If all else fails, you can copy what the contents of your config files are so we can all look at it to find the error. Right i'm using the default one that comes with 9.0 i'm not using the default server it setup i'm using a virtual server i created which points to /home/www as the document root, i created this using webmin. Also i made the files world writeable, readable and executable but to no avail, i will try what you put though tomorrow. I can't remember seeing a .htaccess file although i may have switched view hidden files off. I'd already tried pointing directly to a file and then i got 'forbidden to access /filename.html' I'll post the files up tomorrow thanks sas Quote Link to comment Share on other sites More sharing options...
Guest LinuxExplorer Posted December 6, 2002 Report Share Posted December 6, 2002 Oh yeah, this is a longshot and really simple possible solution, but also...if you leave your computer running all of the time you might want to make sure you've reset the Apache server after you've applied the changes. I know I've forgotten to and felt pretty stupid after I've remembered. Of course you can do this through Webmin pretty easily. Quote Link to comment Share on other sites More sharing options...
Guest ginkoomo Posted February 7, 2003 Report Share Posted February 7, 2003 I'm having this exact same problem. It seems to be something with permissions to the "new" document root location. I'm not sure if its in the Linux side of permissions or the Apache side. Anybody else have any clues. Oh Im a very newbux, so be gentle, lol. Peace Ginko Quote Link to comment Share on other sites More sharing options...
tyme Posted February 7, 2003 Report Share Posted February 7, 2003 did you try accessing the files directly? i get the feeling that apache doesn't like giving directory listings, you have to request specific files. and if you just type in http://localhost it's going to immediately look for index.html or index.shtml, if it doesn't find that, i believe it gives up and tries to get a directory listing. which apache doesn't seem to want to do...... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.