ubuntuforums-unanswered team mailing list archive
-
ubuntuforums-unanswered team
-
Mailing list archive
-
Message #04537
Re: [Question #77406]: Configuring apache2 server
Question #77406 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/77406
Status: Answered => Open
Myroslav is still having a problem:
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
>
>
--
You received this question notification because you are a member of UF
Unanswered Posts Team, which is an answer contact for Ubuntu.