A couple of questions concerning my /var/www folder and security

Discussion in 'Server Operation' started by Heeter, Jan 1, 2016.

  1. Heeter

    Heeter Member

    Hi All,

    I am currently hosting a few domains off my LAMP Ubuntu 14.04, all is working fine.

    The webfolders are located in /var/www/ subfolders.

    1 - But I do not actually have anything in the root /var/www folder itself. Should I have something ( a redirecting file or .htaccess file) in the /var/www folder? Should it be more properly addressed in the apache config file instead?
    2 - Also another thing I noticed is that when I type in the actual IP address of the webserver into a web browser, it lands in nowhere land. I addressed this issue by editing the htaccess file in one of the domain webfolders to do a redirect. Should this be addressed in the apache config file instead?

    Currently, my apache config file looks like this:

    Code:
    <Directory />
      Options FollowSymLinks
      AllowOverride None
      Require all denied
    </Directory>
    
    <Directory /usr/share>
      AllowOverride None
      Require all granted
    </Directory>
    
    <Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
    </Directory>
    
    Regards
     

Share This Page