Hello,
I am using Debian, Apache, Apace-ssl PHP4 and MySQL 4.1. I have installed Moodle via apt-get install. Everything works fine if I use http://localhost/moodle (note: I am using logissl). If I try from another PC or from the same http://myadress/moodle I get access denied.
I must note that the http://myadress returns fine the apache welcome page and that the apache also has another simple folder which can be accessed fine also via http://myadress/folder. I checked the write permissions and they are both the same for moodle and the other folder.
Don't know what to do or where to start looking for something I didn't do.
Thanks for your time
localhost works OK, but I get Access Denied when using my adress
Number of replies: 7Re: localhost works OK, but I get Access Denied when using my adress
The most likely thing is an error in your moodle config.sys file. It should *not* have 'localhost' in the wwwroot setting, it should have 'myaddress' in its place. I assume you have not changed anything in httpd.conf when setting up moodle?
Also, check your apache error log just after the error occurs it may give you more information re. the cause of the error.
Also, check your apache error log just after the error occurs it may give you more information re. the cause of the error.
Re: localhost works OK, but I get Access Denied when using my adress
I'm getting the same or similar problem.
I can see my moodle locally, either through http://localhost/moodle or through http://irvken.homelinux.net/moodle but my potential users can't use the latter, they just get a 403 forbidden error. However the domain works OK - http://irvken.homelinux.net and I already host a couple of sites off it so I assume it must be a problem with moodle config.php , is there anyway to run the install set-up a second time?
Apache error log from external requests -
[Fri Feb 11 06:53:44 2005] [error] [client 64.21.35.80] client denied by server configuration: /usr/share/moodle
Example Apache access log for successful local request -
127.0.0.1 - - [11/Feb/2005:07:15:02 +0000] "GET /moodle/admin/cron.php HTTP/1.0" 200 485 "-" "Wget/1.9.1" "-"
127.0.0.1 - - [11/Feb/2005:07:15:10 +0000] "GET /moodle/irvken.homelinux.net/lib/editor/htmlarea.css HTTP/1.1" 404 334 "http://irvken.homelinux.net/moodle/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" "-"
I can see my moodle locally, either through http://localhost/moodle or through http://irvken.homelinux.net/moodle but my potential users can't use the latter, they just get a 403 forbidden error. However the domain works OK - http://irvken.homelinux.net and I already host a couple of sites off it so I assume it must be a problem with moodle config.php , is there anyway to run the install set-up a second time?
Apache error log from external requests -
[Fri Feb 11 06:53:44 2005] [error] [client 64.21.35.80] client denied by server configuration: /usr/share/moodle
Example Apache access log for successful local request -
127.0.0.1 - - [11/Feb/2005:07:15:02 +0000] "GET /moodle/admin/cron.php HTTP/1.0" 200 485 "-" "Wget/1.9.1" "-"
127.0.0.1 - - [11/Feb/2005:07:15:10 +0000] "GET /moodle/irvken.homelinux.net/lib/editor/htmlarea.css HTTP/1.1" 404 334 "http://irvken.homelinux.net/moodle/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" "-"
Re: localhost works OK, but I get Access Denied when using my adress
[client 64.21.35.80] client denied by server configuration: /usr/share/moodle
...this very possibly means what it says! What is the apache configuration for this folder. Have you (in some way) disabled external access.
...this very possibly means what it says! What is the apache configuration for this folder. Have you (in some way) disabled external access.
Re: localhost works OK, but I get Access Denied when using my adress
I can't think that I have, unless the moodle install rewrote it.
What would the apache config to allow access look like.
Do you think it has anything to do with this bit? Which allows me to host a couple of domains on the server and specifiaclly redirects that domain to docroot /var/www thus preventing access to /usr/share? It's the only thing I can think of?
<VirtualHost *:80>
ServerName irvken.homelinux.net
ServerAlias debirvken
DocumentRoot /var/www
</VirtualHost>
should I add another Virtual host like this -
<VirtualHost *:80>
ServerName irvken.homelinux.net/moodle
ServerAlias debirvken
DocumentRoot /usr/share/moodle
</VirtualHost>
What would the apache config to allow access look like.
Do you think it has anything to do with this bit? Which allows me to host a couple of domains on the server and specifiaclly redirects that domain to docroot /var/www thus preventing access to /usr/share? It's the only thing I can think of?
<VirtualHost *:80>
ServerName irvken.homelinux.net
ServerAlias debirvken
DocumentRoot /var/www
</VirtualHost>
should I add another Virtual host like this -
<VirtualHost *:80>
ServerName irvken.homelinux.net/moodle
ServerAlias debirvken
DocumentRoot /usr/share/moodle
</VirtualHost>
Re: localhost works OK, but I get Access Denied when using my adress
nope, that didn't work.
Re: localhost works OK, but I get Access Denied when using my adress
hmm, I've really borked it now - I've edited the config.php file and it's caused the moodle to loose icons and formatting (locally)
http://irvken.homelinux.net/moodle2.png
unfortunately I've forgotten what was there before!
http://irvken.homelinux.net/moodle.png - this is what it looked like pre-edit
and I'm still no neerer to making it network readable.
http://irvken.homelinux.net/moodle2.png
unfortunately I've forgotten what was there before!
http://irvken.homelinux.net/moodle.png - this is what it looked like pre-edit
and I'm still no neerer to making it network readable.
Re: localhost works OK, but I get Access Denied when using my adress
The answer on your first reply solved my problem. I used myaddress in the wwwroot setting and everything was fine. Sorry for not answering earlier, exams were on their way and time was pressing...
Thank you!
Thank you!
