I have installed LAMP stack on Ubuntu 14.04. Now I want to start apache2 server from terminal. What are the commands to do that?
Asked
Active
Viewed 1.2k times
2 Answers
6
Try executing following command
$sudo service apache2 restart|stop|start
open the web browser and go to the URL http://localhost
if you read
"It works!"
message on browser
which is the content of the file
/var/www/index.html
this proves that Apache server has started and it is working. source.
1
To start the apache2 server from terminal run the command as follows.
sudo /etc/init.d/apache2 start
To make it start automatically at bootup, execute the command as follows.
sudo update-rc.d apache2 enable
Thomas
- 6,433