Wednesday, September 3, 2014

Ubuntu : How to install and remove Apache webserver in Ubuntu and Debian

How to install and remove Apache webserver in Ubuntu and Debian

To install Apache web server in Ubuntu and Debian is easy task. If you have worked on any Red Hat based operating system ,you may find the Apache webserver package name is different.
In Red Hat based Operating System the package name is httpd.
In Debian based operating system like Ubuntu, Linux Mint etc. You can install apache web server by using below given command.
Important information related to Apache web server in Debian based Operating System
Apache User : www-data
Configuration Directory : /etc/apache2
By-Default configuration file : /etc/apache2/sites-enabled/000-default
By-Default Data Directory or Document Directory : /var/www
Logs Directory Path : /var/log/apache2
To start the apache webserver
After starting/restarting/reloading the Apache service,type the IP Address of Web server in Web browser. The first page will show you written “It Works!“.It means the apache service is running.
To stop the apache webserver
To restart the apache webserver
To check status of the apache webserver
To reload the apache webserver
With Apache service there are many usage, you can get the information by using command/etc/init.d/apache2 --help
/etc/init.d/apache2 –help
* Usage: /etc/init.d/apache2 {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}

To remove apache webserver in Debian and Ubuntu

To remove apache webserver in Debian based Operating System,use the given below command.
After this,to completely remove the package
Note: In some cases,system will show message to run apt-get autoremove,hence run this command if face issue while removing the package
Apache Web Server Project Page URL : http://httpd.apache.org/

No comments: