Showing posts with label continue. Show all posts
Showing posts with label continue. Show all posts

Thursday, August 20, 2015

How to Disable Sites in Apache 2


Verify that the site is still enabled. From the Ubuntu Linux command line, issue the following commands:cd \etc\apache2\sites-enabledlsThe first command switches the working directory to the 'sites-enabled' sub-directory. The second command lists the files in the directory. If there is a file for the site you want to disable, continue with Step 2. If not, the site already is disabled.
Issue the following commands at the Ubuntu command prompt:cd (changes to your home directory)sudo a2dissite sitename (where 'sitename' is the name of the site you want to disable) This command removes 'sitename' from the /etc/apache2/sites-available sub-directory.
Verify that the site has been removed from the list of enabled sites with the following command:ls /etc/apache2/sites-enabledYour site should not appear in the sub-directory listing.
Restart the Apache 2 Web server with the following command:sudo /etc/init.d/apache2 restartThis causes Apache 2 to stop listening for requests for the disabled site.
Start a browser session and attempt to navigate to the site. If your site is disabled, you should get a 'Not Found' message on a default error page.
VPS Hosting