Configuring apache2 server

Asked by Myroslav

I am using Jaunty amd64. I installed the program Moodle recently to experiment with it while the college technicians continue work getting the Moodle system ready for general use in the Fall. My installation went smoothly and I began experimenting with the site.

The next day when I logged on to the computer and tried to access my Moodle site in Firefox, I got the message: "Forbidden
You don't have permission to access /moodle/ on this server.
Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch Server at localhost Port 80".

After monkeying around for a while, I restarted apache with the command: sudo /etc/init.d/apache2 restart. I was then able to access my site in my browser.

My question is, must I restart apache each time I try to access my site after having logged off my computer, or is there some change in configuration I could make to avoid this annoying repetitive step?

I would like to add that I would like keep this site for my own private experimentation for now and not for public viewing.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu apache2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Damiano Venturin (damko) said :
#1

I assume that you are using the grafical interface. If not, pls notify me and I'll write another method

Click on
Menu->System->Administration->Services

A windows will open
Click the "unlock" button and type the password

Then go down into the list and check the item "Web Server" (I assume it has the same name even in Russian or any language from the east of europe) and then click "close"

restart your pc / server an try to access again your moodle. it should work without starting the service manually

--
enjoy
Dam
http://dventurin.wordpress.com

Revision history for this message
Myroslav (mgalan) said :
#2

Thank you for your response. I verified that the Web Server (Apache2)
was indeed checked off under System>Administration>Services. The
problem persists. I am required to restart apache manually after a
fresh login to access my Moodle site. Any other ideas?

Thanks again,

M.

Damiano Venturin wrote:
> Your question #77406 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/77406
>
> Status: Open => Answered
>
> Damiano Venturin proposed the following answer:
> I assume that you are using the grafical interface. If not, pls notify
> me and I'll write another method
>
> Click on
> Menu->System->Administration->Services
>
> A windows will open
> Click the "unlock" button and type the password
>
> Then go down into the list and check the item "Web Server" (I assume it
> has the same name even in Russian or any language from the east of
> europe) and then click "close"
>
> restart your pc / server an try to access again your moodle. it should
> work without starting the service manually
>
> --
> enjoy
> Dam
> http://dventurin.wordpress.com
>
>

Revision history for this message
Damiano Venturin (damko) said :
#3

Hi Myroslav

we have to verify one oh the 2:
1) the service doesn't start OR
2) the service starts but something is wrong and it needs to be restart to work properly

let's move on the first:
test A)
reboot your pc and just after login do in a console
sudo ps aux | grep apache

this will let us to discover if the process is running
if you can see at least two rows as output (1 is your command cause of the "grep apache") than:
test B)
we can use nmap to see if port 80 is really open

sudo apt-get install nmap
nmap 127.0.0.1

this should be the output
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http <<<<<<<<<

if you see the 80/tcp we verify that is really apache running on the 80
test C)
sudo fuser 80/tcp | tee > /tmp/A
for pid in $(cat /tmp/A); do echo $pid $(ps -p $pid -o comm=); done

you should see an output like this
13482 apache2
13498 apache2
13499 apache2
13500 apache2
13501 apache2

it means that every process running and using port 80 is apache2

test D)
if you have the graphical interface an launch firefox in local pointing it on 127.0.0.1/moodle
if it works we can try the last test, i.e. we check if it works in the network

test E)
install nmap (there is also the windows version) on another pc in the same network class of your computer and scan your pc
nmap your_server_ip

it's long I know :-) but it's longer to be written it than performed
if every test is verified we move on 2nd troubleshooting

bye!

--
enjoy
Dam

Revision history for this message
Myroslav (mgalan) said :
#4

Hi Dam,

Thank you for your time and patience.

Here is the output for Test A:

> sudo ps aux | grep apache
>
> root 3542 0.0 0.2 198772 9044 ? Ss 09:10 0:00
> /usr/sbin/apache2 -k start
> www-data 3638 0.0 0.1 198772 5236 ? S 09:10 0:00
> /usr/sbin/apache2 -k start
> www-data 3639 0.0 0.1 198772 5236 ? S 09:10 0:00
> /usr/sbin/apache2 -k start
> www-data 3640 0.0 0.1 198772 5236 ? S 09:10 0:00
> /usr/sbin/apache2 -k start
> www-data 3641 0.0 0.1 198772 5236 ? S 09:10 0:00
> /usr/sbin/apache2 -k start
> www-data 3642 0.0 0.1 198772 5236 ? S 09:10 0:00
> /usr/sbin/apache2 -k start
> mg 4235 0.0 0.0 7528 912 pts/0 S+ 09:16 0:00 grep
> apache

Here is the output for Test B:
> Starting Nmap 4.76 ( http://nmap.org ) at 2009-07-19 09:19 EDT
> Interesting ports on localhost (127.0.0.1):
> Not shown: 996 closed ports
> PORT STATE SERVICE
> 80/tcp open http
> 631/tcp open ipp
> 3306/tcp open mysql
> 5432/tcp open postgresql
>
> Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
Here is the output for Test C:

> for pid in $(cat /tmp/A); do echo $pid $(ps -p $pid -o comm=); done
> 3542 apache2
> 3638 apache2
> 3639 apache2
> 3640 apache2
> 3641 apache2
> 3642 apache2
Pointing to 127.0.0.1/moodle gets me to the home page I want to get to,
but as soon as I try to log on to this page, it reverts to the old message:

Forbidden
You don't have permission to access /moodle/ on this server.
Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch Server at
localhost Port 80.

I have to restart apache with "sudo /etc/init.d/apache2 restart" before
I can fully access the site.

As for your last point, I am not on a network, but working from home on
a stand-alone desktop.

I am wondering if there is a glitch somewhere in the Moodle
configuration files. What do you think? Maybe I should copy this
question to the Moodle help forum.

I am very appreciative of your efforts.

Thank you.

Damiano Venturin wrote:
> Your question #77406 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/77406
>
> Status: Open => Answered
>
> Damiano Venturin proposed the following answer:
> Hi Myroslav
>
> we have to verify one oh the 2:
> 1) the service doesn't start OR
> 2) the service starts but something is wrong and it needs to be restart to work properly
>
> let's move on the first:
> test A)
> reboot your pc and just after login do in a console
> sudo ps aux | grep apache
>
> this will let us to discover if the process is running
> if you can see at least two rows as output (1 is your command cause of the "grep apache") than:
> test B)
> we can use nmap to see if port 80 is really open
>
> sudo apt-get install nmap
> nmap 127.0.0.1
>
> this should be the output
> PORT STATE SERVICE
> 22/tcp open ssh
> 80/tcp open http <<<<<<<<<
>
> if you see the 80/tcp we verify that is really apache running on the 80
> test C)
> sudo fuser 80/tcp | tee > /tmp/A
> for pid in $(cat /tmp/A); do echo $pid $(ps -p $pid -o comm=); done
>
> you should see an output like this
> 13482 apache2
> 13498 apache2
> 13499 apache2
> 13500 apache2
> 13501 apache2
>
> it means that every process running and using port 80 is apache2
>
> test D)
> if you have the graphical interface an launch firefox in local pointing it on 127.0.0.1/moodle
> if it works we can try the last test, i.e. we check if it works in the network
>
> test E)
> install nmap (there is also the windows version) on another pc in the same network class of your computer and scan your pc
> nmap your_server_ip
>
> it's long I know :-) but it's longer to be written it than performed
> if every test is verified we move on 2nd troubleshooting
>
> bye!
>
> --
> enjoy
> Dam
>
>

Revision history for this message
Damiano Venturin (damko) said :
#5

Hi Myroslav
thank you to be so polite but it's a pleasure for me. Answering questions help me to learn. :-D

Well apache works, no doubt and I was pretty sure of this. Now I'm sure.
For sure there is a misconfiguration somewhere. Not a big deal fortunately.

test A)
I would like to check permissions on file, but I'm pretty sure is not the problem:
ls -lh /var/www

test B)
I don't think it's a moodle configuration and to prove this we need to know if another web application can work just after a restart.
Do you have any other web application installated? for example phpmyadmin (do you know it? it's a web interface to manage mysql database.)

sudo apt-get install phpmyadmin

test it on 127.0.0.1/phpmyadmin <- username = root , password = the mysql password you picked when installed your lamp server

if it works restart an try accessing phpmyadmin first, than moodle

cheers!

Revision history for this message
Myroslav (mgalan) said :
#6

Hi Dam,

Thank you for your time.

Test A. Here is the output:

ls -lh /var/www
total 4.0K
-rw-r--r-- 1 root root 45 2009-07-18 09:24 index.html

Test B. I do not know this program phpmyadmin. The following is the output when I installed it:

sudo apt-get install phpmyadmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  phpmyadmin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/3613kB of archives.
After this operation, 13.5MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package phpmyadmin.
(Reading database ... 206388 files and directories currently installed.)
Unpacking phpmyadmin (from .../phpmyadmin_4%3a3.1.2-1ubuntu0.1_all.deb) ...
Setting up phpmyadmin (4:3.1.2-1ubuntu0.1) ...
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
*** WARNING: ucf was run from a maintainer script that uses debconf, but
             the script did not pass --debconf-ok to ucf. The maintainer
             script should be fixed to not stop debconf before calling ucf,
             and pass it this parameter. For now, ucf will revert to using
             old-style, non-debconf prompting. Ugh!

             Please inform the package maintainer about this problem.

Creating config file /etc/dbconfig-common/phpmyadmin.conf with new version

Creating config file /etc/phpmyadmin/config-db.php with new version
granting access to database phpmyadmin for phpmyadmin@localhost: already exists.
creating database phpmyadmin: already exists.
populating database via sql... done.
dbconfig-common: flushing administrative password

I'm not sure what the Warning is all about. When I go to "127.0.0.0/phpmyadmin" in my browser, I get the following message:

Unable to connect
Firefox can't establish a connection to the server at 127.0.0.0.

Thank you

Revision history for this message
Damiano Venturin (damko) said :
#7

127.0.0.1/phpmyadmin << carefull! it ends with "1"

Revision history for this message
Myroslav (mgalan) said :
#8

Same error - not found on this server.

Damiano Venturin wrote:
> Your question #77406 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/77406
>
> Status: Open => Answered
>
> Damiano Venturin proposed the following answer:
> 127.0.0.1/phpmyadmin << carefull! it ends with "1"
>
>

Revision history for this message
Damiano Venturin (damko) said :
#9

really? mmm

test A)
restart apache then try htpp://127.0.0.1/phpmyadmin

if it doesn't work:
test B)
sudo dpkg-reconfigure phpmyadmin

I'm sorry if it's getting too long but ... it's something nestled

cheers!

Revision history for this message
Myroslav (mgalan) said :
#10

Thank you Dam, but no success.

After doing what you suggested, I get this from Firefox:

"The requested URL /phpmyadmin was not found on this server.

------------------------------------------------------------------------
Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch Server at
127.0.0.1 Port 80"

I will try another approach and I will get back to you.

Damiano Venturin wrote:
> Your question #77406 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/77406
>
> Status: Open => Answered
>
> Damiano Venturin proposed the following answer:
> really? mmm
>
> test A)
> restart apache then try htpp://127.0.0.1/phpmyadmin
>
> if it doesn't work:
> test B)
> sudo dpkg-reconfigure phpmyadmin
>
> I'm sorry if it's getting too long but ... it's something nestled
>
> cheers!
>
>

Revision history for this message
Myroslav (mgalan) said :
#11

Hi Dam,

Attached is a document providing the output from logfiles in apache2. I
suspect that there might be a clue for solving my problem here somewhere.
I do not know how to read these files and if they are relevant. Maybe
you are more knowledgeable about these things.

Thanks again for your interest and help.

Damiano Venturin wrote:
> Your question #77406 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/77406
>
> Status: Open => Answered
>
> Damiano Venturin proposed the following answer:
> really? mmm
>
> test A)
> restart apache then try htpp://127.0.0.1/phpmyadmin
>
> if it doesn't work:
> test B)
> sudo dpkg-reconfigure phpmyadmin
>
> I'm sorry if it's getting too long but ... it's something nestled
>
> cheers!
>
>

Revision history for this message
Myroslav (mgalan) said :
#12

Hello Dam,

It appears as though we cannot send attachments with messages in this
forum so my last message did not contain the output of which I spoke. I
have cut and pasted it below.

> *Output from /var/log/apache2/error.log after trying to log in to
> moodle after fresh boot:*
>
>
> [Mon Jul 20 18:44:10 2009] [notice] Apache/2.2.11 (Ubuntu)
> PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal
> operations
>
> [Mon Jul 20 18:47:59 2009] [error] [client ::1] client denied by
> server configuration: /usr/share/moodle/
>
> [Mon Jul 20 18:47:59 2009] [error] [client ::1] File does not exist:
> /var/www/favicon.ico
>
> [Mon Jul 20 18:50:17 2009] [notice] caught SIGTERM, shutting down
>
> [Mon Jul 20 18:50:18 2009] [notice] Apache/2.2.11 (Ubuntu)
> PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal
> operations
>
>
> *Output from /var/log/apache2/access.log after entering “sudo
> /etc/init.d/apache2 restart” and logging onto moodle successfully:*
>
>
> ::1 - - [20/Jul/2009:18:47:59 -0400] "GET /moodle/ HTTP/1.1" 403 261
> "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1)
> Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> ::1 - - [20/Jul/2009:18:47:59 -0400] "GET /favicon.ico HTTP/1.1" 404
> 262 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1)
> Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:41 -0400] "GET /moodle/ HTTP/1.1" 200
> 3142 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1)
> Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/theme/standardwhite/favicon.ico HTTP/1.1" 200 894 "-"
> "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090716
> Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/lib/javascript-static.js HTTP/1.1" 200 15443
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET /moodle/lib/cookies.js
> HTTP/1.1" 200 2423 "http://localhost/moodle/" "Mozilla/5.0 (X11; U;
> Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty)
> Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET /moodle/lib/ufo.js
> HTTP/1.1" 200 11344 "http://localhost/moodle/" "Mozilla/5.0 (X11; U;
> Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty)
> Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/lib/dropdown.js HTTP/1.1" 200 2612 "http://localhost/moodle/"
> "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090716
> Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/lib/overlib/overlib_cssstyle.js HTTP/1.1" 200 8825
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/calendar/overlib.cfg.php HTTP/1.1" 200 136
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/lib/overlib/overlib.js HTTP/1.1" 200 49241
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/theme/standardwhite/styles.php HTTP/1.1" 200 663
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/lib/javascript-mod.php HTTP/1.1" 200 34
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:42 -0400] "GET
> /moodle/theme/standard/styles.php HTTP/1.1" 200 123714
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:43 -0400] "GET
> /moodle/pix/moodlelogo.gif HTTP/1.1" 200 2617
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:43 -0400] "GET
> /moodle/pix/t/switch_minus.gif HTTP/1.1" 200 119
> "http://localhost/moodle/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;
> rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:55:43 -0400] "GET
> /moodle/theme/standardwhite/gradient.jpg HTTP/1.1" 200 373
> "http://localhost/moodle/theme/standardwhite/styles.php" "Mozilla/5.0
> (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090716 Ubuntu/9.04
> (jaunty) Shiretoko/3.5.1"
>
> 127.0.0.1 - - [20/Jul/2009:18:56:00 -0400] "OPTIONS * HTTP/1.0" 200 -
> "-" "Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch
> (internal dummy connection)"
>
> 127.0.0.1 - - [20/Jul/2009:18:56:01 -0400] "OPTIONS * HTTP/1.0" 200 -
> "-" "Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch
> (internal dummy connection)"
>
>
> *This is the output from/var/log/apache2/error.log after trying to log
> in to moodle and then phpmyadmin:*
>
> [Mon Jul 20 18:44:10 2009] [notice] Apache/2.2.11 (Ubuntu)
> PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal
> operations
>
> [Mon Jul 20 18:47:59 2009] [error] [client ::1] client denied by
> server configuration: /usr/share/moodle/
>
> [Mon Jul 20 18:47:59 2009] [error] [client ::1] File does not exist:
> /var/www/favicon.ico
>
> [Mon Jul 20 18:50:17 2009] [notice] caught SIGTERM, shutting down
>
> [Mon Jul 20 18:50:18 2009] [notice] Apache/2.2.11 (Ubuntu)
> PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch configured -- resuming normal
> operations
>
> [Mon Jul 20 19:00:23 2009] [error] [client 127.0.0.1] File does not
> exist: /var/www/phpmyadmin
>
> [Mon Jul 20 19:00:23 2009] [error] [client 127.0.0.1] File does not
> exist: /var/www/favicon.ico
>
>
>

Revision history for this message
Damiano Venturin (damko) said :
#13

Hi Myroslav, I'm late, sorry. Heavy week

tip: when you need to attach a document, paste it on http://pastebin.org

* I can't see the access.log after a fresh boot

the most interesting row in your log file is: 'client denied by server configuration: /usr/share/moodle/' but it doesn't help that much. Anyway everything points to a misconfiguration in apache

* test A)
we create a simple php file a check it after a fresh reboot
sudo echo "<?php phpinfo(); ?>" > /var/www/phpinfo.php
fresh reboot and then from the browser http://localhost/phpinfo.php
if it doesn't work we have a firewall somewhere or some issue into the apache configuration

* test B)
just to understand why phpmyadmin doesn't work (this is really strange)
pls paste the output on pastebin

ls -lh /usr/share/phpmyadmin

cat /etc/apache2/conf.d/phpmyadmin.conf

* test C)
just to have a look to apache's conf files: (on pastebin)
sudo apt-get install tree
cd /etc/apache2/
tree -L 2

ciao!

Revision history for this message
Myroslav (mgalan) said :
#14

Hi Dam,

I have been away from my computer on an all too short vacation, hence my
tardy response. Thank you for your suggestions. Below is the output
for the tests you requested.

Test A.

> bash: /var/www/phpinfo.php: Permission denied
Test B.

> $ ls -lh /usr/share/phpmyadmin
> total 992K
> -rw-r--r-- 1 root root 11K 2009-01-19 12:35 browse_foreigners.php
> -rw-r--r-- 1 root root 4.3K 2009-01-19 12:35 bs_change_mime_type.php
> -rw-r--r-- 1 root root 1.8K 2009-07-05 12:42 bs_disp_as_mime_type.php
> -rw-r--r-- 1 root root 2.2K 2009-01-19 12:35 bs_play_media.php
> -rw-r--r-- 1 root root 782 2009-01-19 12:35 calendar.php
> -rw-r--r-- 1 root root 3.5K 2009-07-05 12:42 changelog.php
> -rw-r--r-- 1 root root 460 2009-01-19 12:35 chk_rel.php
> -rw-r--r-- 1 root root 181 2009-07-05 12:42 config.footer.inc.php
> -rw-r--r-- 1 root root 181 2009-07-05 12:42 config.header.inc.php
> -rw-r--r-- 1 root root 1.3K 2009-07-05 12:42 config.inc.php
> -rw-r--r-- 1 root root 2.1K 2009-01-19 12:35 config.sample.inc.php
> -rw-r--r-- 1 root root 1.5K 2009-01-19 12:35 db_create.php
> -rw-r--r-- 1 root root 11K 2009-01-19 12:35 db_datadict.php
> -rw-r--r-- 1 root root 2.4K 2009-01-19 12:35 db_export.php
> -rw-r--r-- 1 root root 471 2009-01-19 12:35 db_import.php
> -rw-r--r-- 1 root root 26K 2009-01-19 12:35 db_operations.php
> -rw-r--r-- 1 root root 7.3K 2009-01-19 12:35 db_printview.php
> -rw-r--r-- 1 root root 30K 2009-01-19 12:35 db_qbe.php
> -rw-r--r-- 1 root root 13K 2009-01-19 12:35 db_search.php
> -rw-r--r-- 1 root root 984 2009-01-19 12:35 db_sql.php
> -rw-r--r-- 1 root root 23K 2009-01-19 12:35 db_structure.php
> lrwxrwxrwx 1 root root 26 2009-07-19 11:22 docs.css ->
> ../doc/phpmyadmin/docs.css
> lrwxrwxrwx 1 root root 36 2009-07-19 11:22 Documentation.html ->
> ../doc/phpmyadmin/Documentation.html
> -rw-r--r-- 1 root root 2.2K 2009-01-19 12:35 error.php
> -rw-r--r-- 1 root root 24K 2009-01-19 12:35 export.php
> -rw-r--r-- 1 root root 19K 2009-01-19 12:35 favicon.ico
> -rw-r--r-- 1 root root 14K 2009-01-19 12:35 import.php
> -rw-r--r-- 1 root root 6.7K 2009-01-19 12:35 index.php
> drwxr-xr-x 3 root root 4.0K 2009-07-19 11:22 js
> drwxr-xr-x 2 root root 4.0K 2009-07-19 11:22 lang
> drwxr-xr-x 10 root root 4.0K 2009-07-19 11:22 libraries
> -rw-r--r-- 1 root root 439 2009-07-05 12:42 license.php
> -rw-r--r-- 1 root root 12K 2009-01-19 12:35 main.php
> -rw-r--r-- 1 root root 26K 2009-01-19 12:35 navigation.php
> -rw-r--r-- 1 root root 27K 2009-01-19 12:35 pdf_pages.php
> -rw-r--r-- 1 root root 52K 2009-01-19 12:35 pdf_schema.php
> -rw-r--r-- 1 root root 360 2009-01-19 12:35 phpinfo.php
> -rw-r--r-- 1 root root 1.1K 2009-01-19 12:35 phpmyadmin.css.php
> drwxr-xr-x 5 root root 4.0K 2009-07-19 11:22 pmd
> -rw-r--r-- 1 root root 9.6K 2009-01-19 12:35 pmd_common.php
> -rw-r--r-- 1 root root 1.9K 2009-01-19 12:35 pmd_display_field.php
> -rw-r--r-- 1 root root 19K 2009-01-19 12:35 pmd_general.php
> -rw-r--r-- 1 root root 880 2009-01-19 12:35 pmd_help.php
> -rw-r--r-- 1 root root 3.5K 2009-01-19 12:35 pmd_pdf.php
> -rw-r--r-- 1 root root 4.0K 2009-01-19 12:35 pmd_relation_new.php
> -rw-r--r-- 1 root root 2.0K 2009-01-19 12:35 pmd_relation_upd.php
> -rw-r--r-- 1 root root 2.1K 2009-01-19 12:35 pmd_save_pos.php
> -rw-r--r-- 1 root root 1.1K 2009-01-19 12:35 print.css
> -rw-r--r-- 1 root root 8.1K 2009-01-19 12:35 querywindow.php
> -rw-r--r-- 1 root root 7.5K 2009-01-19 12:35 server_binlog.php
> -rw-r--r-- 1 root root 2.6K 2009-01-19 12:35 server_collations.php
> -rw-r--r-- 1 root root 14K 2009-01-19 12:35 server_databases.php
> -rw-r--r-- 1 root root 4.6K 2009-01-19 12:35 server_engines.php
> -rw-r--r-- 1 root root 1.7K 2009-01-19 12:35 server_export.php
> -rw-r--r-- 1 root root 486 2009-01-19 12:35 server_import.php
> -rw-r--r-- 1 root root 93K 2009-01-19 12:35 server_privileges.php
> -rw-r--r-- 1 root root 2.9K 2009-01-19 12:35 server_processlist.php
> -rw-r--r-- 1 root root 595 2009-01-19 12:35 server_sql.php
> -rw-r--r-- 1 root root 21K 2009-01-19 12:35 server_status.php
> -rw-r--r-- 1 root root 2.2K 2009-01-19 12:35 server_variables.php
> drwxr-xr-x 4 root root 4.0K 2009-07-19 11:22 setup
> -rw-r--r-- 1 root root 317 2009-01-19 12:35 show_config_errors.php
> -rw-r--r-- 1 root root 26K 2009-07-05 12:42 sql.php
> -rw-r--r-- 1 root root 7.8K 2009-01-19 12:35 tbl_addfield.php
> -rw-r--r-- 1 root root 7.1K 2009-01-19 12:35 tbl_alter.php
> -rw-r--r-- 1 root root 52K 2009-01-19 12:35 tbl_change.php
> -rw-r--r-- 1 root root 9.5K 2009-01-19 12:35 tbl_create.php
> -rw-r--r-- 1 root root 2.6K 2009-01-19 12:35 tbl_export.php
> -rw-r--r-- 1 root root 635 2009-01-19 12:35 tbl_import.php
> -rw-r--r-- 1 root root 7.9K 2009-01-19 12:35 tbl_indexes.php
> -rw-r--r-- 1 root root 2.5K 2009-01-19 12:35 tbl_move_copy.php
> -rw-r--r-- 1 root root 26K 2009-01-19 12:35 tbl_operations.php
> -rw-r--r-- 1 root root 17K 2009-01-19 12:35 tbl_printview.php
> -rw-r--r-- 1 root root 21K 2009-01-19 12:35 tbl_relation.php
> -rw-r--r-- 1 root root 14K 2009-01-19 12:35 tbl_replace.php
> -rw-r--r-- 1 root root 5.1K 2009-01-19 12:35 tbl_row_action.php
> -rw-r--r-- 1 root root 16K 2009-01-19 12:35 tbl_select.php
> -rw-r--r-- 1 root root 924 2009-01-19 12:35 tbl_sql.php
> -rw-r--r-- 1 root root 31K 2009-01-19 12:35 tbl_structure.php
> drwxr-xr-x 4 root root 4.0K 2009-07-19 11:22 themes
> -rw-r--r-- 1 root root 1.1K 2009-01-19 12:35 themes.php
> -rw-r--r-- 1 root root 1.7K 2009-01-19 12:35 transformation_overview.php
> -rw-r--r-- 1 root root 3.7K 2009-01-19 12:35 transformation_wrapper.php
> lrwxrwxrwx 1 root root 34 2009-07-19 11:22 translators.html ->
> ../doc/phpmyadmin/translators.html
> -rw-r--r-- 1 root root 4.5K 2009-01-19 12:35 user_password.php
> -rw-r--r-- 1 root root 5.3K 2009-01-19 12:35 view_create.php
> -rw-r--r-- 1 root root 1014 2009-01-19 12:35 webapp.php

> $ cat /etc/apache2/conf.d/phpmyadmin.conf
> cat: /etc/apache2/conf.d/phpmyadmin.conf: No such file or directory
Test C.

> |-- apache2.conf
> |-- conf.d
> | |-- charset
> | |-- moodle -> /etc/moodle/apache.conf
> | |-- moodle~
> | `-- security
> |-- envvars
> |-- httpd.conf
> |-- mods-available
> | |-- actions.conf
> | |-- actions.load
> | |-- alias.conf
> | |-- alias.load
> | |-- asis.load
> | |-- auth_basic.load
> | |-- auth_digest.load
> | |-- authn_alias.load
> | |-- authn_anon.load
> | |-- authn_dbd.load
> | |-- authn_dbm.load
> | |-- authn_default.load
> | |-- authn_file.load
> | |-- authnz_ldap.load
> | |-- authz_dbm.load
> | |-- authz_default.load
> | |-- authz_groupfile.load
> | |-- authz_host.load
> | |-- authz_owner.load
> | |-- authz_user.load
> | |-- autoindex.conf
> | |-- autoindex.load
> | |-- cache.load
> | |-- cern_meta.load
> | |-- cgi.load
> | |-- cgid.conf
> | |-- cgid.load
> | |-- charset_lite.load
> | |-- dav.load
> | |-- dav_fs.conf
> | |-- dav_fs.load
> | |-- dav_lock.load
> | |-- dbd.load
> | |-- deflate.conf
> | |-- deflate.load
> | |-- dir.conf
> | |-- dir.load
> | |-- disk_cache.conf
> | |-- disk_cache.load
> | |-- dump_io.load
> | |-- env.load
> | |-- expires.load
> | |-- ext_filter.load
> | |-- file_cache.load
> | |-- filter.load
> | |-- headers.load
> | |-- ident.load
> | |-- imagemap.load
> | |-- include.load
> | |-- info.conf
> | |-- info.load
> | |-- ldap.load
> | |-- log_forensic.load
> | |-- mem_cache.conf
> | |-- mem_cache.load
> | |-- mime.conf
> | |-- mime.load
> | |-- mime_magic.conf
> | |-- mime_magic.load
> | |-- negotiation.conf
> | |-- negotiation.load
> | |-- php5.conf
> | |-- php5.load
> | |-- proxy.conf
> | |-- proxy.load
> | |-- proxy_ajp.load
> | |-- proxy_balancer.load
> | |-- proxy_connect.load
> | |-- proxy_ftp.load
> | |-- proxy_http.load
> | |-- rewrite.load
> | |-- setenvif.conf
> | |-- setenvif.load
> | |-- speling.load
> | |-- ssl.conf
> | |-- ssl.load
> | |-- status.conf
> | |-- status.load
> | |-- substitute.load
> | |-- suexec.load
> | |-- unique_id.load
> | |-- userdir.conf
> | |-- userdir.load
> | |-- usertrack.load
> | |-- version.load
> | `-- vhost_alias.load
> |-- mods-enabled
> | |-- alias.conf -> ../mods-available/alias.conf
> | |-- alias.load -> ../mods-available/alias.load
> | |-- auth_basic.load -> ../mods-available/auth_basic.load
> | |-- authn_file.load -> ../mods-available/authn_file.load
> | |-- authz_default.load -> ../mods-available/authz_default.load
> | |-- authz_groupfile.load -> ../mods-available/authz_groupfile.load
> | |-- authz_host.load -> ../mods-available/authz_host.load
> | |-- authz_user.load -> ../mods-available/authz_user.load
> | |-- autoindex.conf -> ../mods-available/autoindex.conf
> | |-- autoindex.load -> ../mods-available/autoindex.load
> | |-- cgi.load -> ../mods-available/cgi.load
> | |-- deflate.conf -> ../mods-available/deflate.conf
> | |-- deflate.load -> ../mods-available/deflate.load
> | |-- dir.conf -> ../mods-available/dir.conf
> | |-- dir.load -> ../mods-available/dir.load
> | |-- env.load -> ../mods-available/env.load
> | |-- mime.conf -> ../mods-available/mime.conf
> | |-- mime.load -> ../mods-available/mime.load
> | |-- negotiation.conf -> ../mods-available/negotiation.conf
> | |-- negotiation.load -> ../mods-available/negotiation.load
> | |-- php5.conf -> ../mods-available/php5.conf
> | |-- php5.load -> ../mods-available/php5.load
> | |-- setenvif.conf -> ../mods-available/setenvif.conf
> | |-- setenvif.load -> ../mods-available/setenvif.load
> | |-- status.conf -> ../mods-available/status.conf
> | `-- status.load -> ../mods-available/status.load
> |-- ports.conf
> |-- sites-available
> | |-- default
> | |-- default-ssl
> | |-- default.save
> | `-- default~
> `-- sites-enabled
> `-- 000-default -> ../sites-available/default
>
> 5 directories, 125 files
I don't know what all this means. However, when I type "sudo
/etc/init.d/apache2 restart", I am able to access Moodle and do what I
have to do. I can live with this since I do not use apache for any
other purposes. What do you think about checking off this question as
"solved"? Or, are you inclined to keep trying?

Thank for your efforts.

M

Damiano Venturin wrote:
> Your question #77406 on apache2 in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/apache2/+question/77406
>
> Status: Open => Answered
>
> Damiano Venturin proposed the following answer:
> Hi Myroslav, I'm late, sorry. Heavy week
>
> tip: when you need to attach a document, paste it on http://pastebin.org
>
> * I can't see the access.log after a fresh boot
>
> the most interesting row in your log file is: 'client denied by server
> configuration: /usr/share/moodle/' but it doesn't help that much. Anyway
> everything points to a misconfiguration in apache
>
> * test A)
> we create a simple php file a check it after a fresh reboot
> sudo echo "<?php phpinfo(); ?>" > /var/www/phpinfo.php
> fresh reboot and then from the browser http://localhost/phpinfo.php
> if it doesn't work we have a firewall somewhere or some issue into the apache configuration
>
> * test B)
> just to understand why phpmyadmin doesn't work (this is really strange)
> pls paste the output on pastebin
>
> ls -lh /usr/share/phpmyadmin
>
> cat /etc/apache2/conf.d/phpmyadmin.conf
>
> * test C)
> just to have a look to apache's conf files: (on pastebin)
> sudo apt-get install tree
> cd /etc/apache2/
> tree -L 2
>
> ciao!
>
>

Revision history for this message
Damiano Venturin (damko) said :
#15

Hi Miroslav
I read your reply, If you like tomorrow I'll give a better look and we keep on trying ;-)

Bye!

Revision history for this message
Launchpad Janitor (janitor) said :
#16

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.