0

I am new to Ubuntu. i have installed apache2. I want to start apache2 by command but i am unable to find it any of the directory in root. I just want to know where is that apache2 file stored and how can i start it with command?

3 Answers3

1

The apache config is in :

/etc/apache2

If you want to start apache, launch in a term :

sudo service apache2 start

If you want to restart apache, launch in a term :

sudo service apache2 restart
Kgaut
  • 126
  • 3
0

After installation of apache2 package the server should be started as daemon on machine startup. Therefore, it should run. Just open a browser and check localhost for a running webserver. It should result in an "It work's" page of apache.

Byte Commander
  • 107,489
0

Based on your command you are most likely trying to find the html files.

You can edit the html files by adding to the /var/www/html directory.

Unless you add your own html files you will get the default index.html page.

You can make your own personal changes by editing or changing the default index.html file.

For instance:

$ sudo -H gedit /etc/www/html/index.html

Whatever yo uplace in that file will come up when you access your server with by placing the host, ip address, or the word localhost in the web browser.

Please note that the $ is a default terminal prompt for a normal user. If you were logged in as root the default prompt would be #. You would't need the sudo command if you were logged in under root.

L. D. James
  • 25,036