lastlegends
Posts: 3
Joined: Mon Jun 03, 2013 10:54 pm

Apache2 Server Issues

Mon Jun 03, 2013 11:06 pm

Hello, I recently got a Pi and I wanted to put an apache2 server on it as I was playing with one last summer and I figured the Pi was a great small, low power option for learning to use apache.

So far I have successfully installed apache2, opened router ports, and set up a DDNS service to point to my Pi. The default webpage that apache displays upon navigating to my Pi's IP address also appears correctly.

However, when I disable a web site with sudo a2dissite, the Pi continues hosting the website, even after I reload apache using sudo service apache2 reload or service apache2 restart. The symlink in the sites-enabled folder is deleted when I run a2dissite, but the page still appears in my browser when I navigate to it.

I have also tried moving the file for the default webpage out of the sites-available to another directory only to find that the default webpage still displays, even though it is disabled and the config file for it has been removed from the sites-available folder.

I am unsure if this is a problem caused by apache itself or the Pi, but if anyone could shed some light on this issue it would be greatly appreciated.

User avatar
Curt Timmerman
Posts: 7
Joined: Sat Dec 22, 2012 3:02 am
Location: Big Lake, Alaska

Re: Apache2 Server Issues

Tue Jun 04, 2013 5:14 pm

This may be a caching issue. Add a phony parameter to the URL and see if you get the same results. Example:
http://mysite?x=y

Curt

lastlegends
Posts: 3
Joined: Mon Jun 03, 2013 10:54 pm

Re: Apache2 Server Issues

Tue Jun 04, 2013 9:56 pm

Unfortunately adding a phony parameter to the URL does not help either. I'm completely at a loss.
It almost appears as if the file system changes that are made when a2dissite is called are not actually occurring. While ls -al shows that no links (or any other items) exist in the sites-enabled folder, the webpage is still served as if the 000-default link was still present. The webpage is also served even if I move the default webpage's config file from apache's sites-available folder.

andrum99
Posts: 439
Joined: Fri Jul 20, 2012 2:41 pm

Re: Apache2 Server Issues

Tue Jun 04, 2013 10:13 pm

Did you try a full 'stop' and 'start' instead of a 'reload' or 'restart'? Also, can you try pressing CTRL+F5 to reload the page in your browser - this is meant to bypass all caches, unlike F5 on its own.

lastlegends
Posts: 3
Joined: Mon Jun 03, 2013 10:54 pm

Re: Apache2 Server Issues

Tue Jun 04, 2013 11:08 pm

No luck with that either. I stopped apache after disabling the config file, reloaded the webpage to make sure that apache really was stopped, and then started apache with the default webpage supposedly disabled. Reloaded page with ctrl+F5 and got back to apache's default "it works!" splash page.

Return to “Networking and servers”