Where is the directory for your web contents using LAMP?

23,136

I think you can find that and more in the directory /etc/apache2/sites-available/, usually in the file default unless it's been renamed somewhere or you have more than one site.

This file should have an entry something like

<VirtualHost *:80>
    DocumentRoot /var/www
    ...

In the above case, the DocumentRoot corresponds to the the web root directory.

In this file, you can create any number of virtual hosts for various sites you might want to define.

Share:
23,136

Related videos on Youtube

Enigmatic
Author by

Enigmatic

I have been a Linux user for years. Not only with Ubuntu, but with other systems as well, so I have a bit of experience with Linux and Unix-like systems. I am also somewhat of a hobbyist, I do some basic web development - HTML, CSS, PHP, that sort or thing... Whatever miscellaneous projects keep me occupied. I'm just here to ask the questions I have and answer the ones that I can.

Updated on September 18, 2022

Comments

  • Enigmatic
    Enigmatic over 1 year

    Okay, I have used XAMPP and Apache on Windows before, but I have never tried it on Ubuntu... On top of that, I am using Ubuntu Server with 12.04 with CLI, no desktop environment or GUI.

    I believe using X11 or a GUI opens up various other vulnerabilities and exploits, and I am working on a little project with the server- I want to make it public, not just a local server...

    Back to the main problem- I have no idea where the directories are on LAMP on Ubuntu v12.04. I searched but can not find myself.

    Additionally, does anyone have an idea where it is for Lighttpd? This is just a bonus question, I am more worried about the LAMP directories, but I may experiment with lighttpd instead later down the line.