cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Apache question

SOLVED

Installing Apache question

I'm trying to install Apache on brand new Ubuntu following this link tutorial but I don't understand what is <value from Apache site>. Can somebody explain it to me?

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride <value from Apache site>
Order allow,deny
Allow from all
<Directory>
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Installing Apache question

Hi @sergey_sherstob 

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride <value from Apache site>
Order allow,deny
Allow from all
<Directory>

This is related to your Directory permission so in "AllowOverride <value from Apache site>" so in this you need to pass your directory permission like "Allow from all" so it will be like :

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride Allow from all
Order allow,deny
Allow from all
<Directory>

it will give appropriate permission to your directory. if you don't want to give Allow permission then you need to pass deny from all. in usual cases we pass Allow from all which will easily run your project.

 If my answer is useful, please Accept as Solution & give Kudos
Shubham khandelwal 

View solution in original post

5 REPLIES 5

Re: Installing Apache question

Hi @sergey_sherstob 

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride <value from Apache site>
Order allow,deny
Allow from all
<Directory>

This is related to your Directory permission so in "AllowOverride <value from Apache site>" so in this you need to pass your directory permission like "Allow from all" so it will be like :

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride Allow from all
Order allow,deny
Allow from all
<Directory>

it will give appropriate permission to your directory. if you don't want to give Allow permission then you need to pass deny from all. in usual cases we pass Allow from all which will easily run your project.

 If my answer is useful, please Accept as Solution & give Kudos
Shubham khandelwal 

Re: Installing Apache question

@shubham_khandelwal1 

Additional question about Apache settings: so I'm trying to change file /etc/apache2/sites-available/000-default.conf and the file itself already has text

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Should I put the text from your reply inside <VirtualHost> as

<VirtualHost>
  <Directory /var/www/>
  <Directory>
</VirtualHost>

Or should I put it outside as 

<VirtualHost>
</VirtualHost>
<Directory /var/www/>
<Directory>

If you don't mind can you please post a complete example of Apache file settings to be clear?

Re: Installing Apache question

Hi @sergey_sherstob

Yes if you trying to create virtual host then you need to put it inside <VirtualHost>

Re: Installing Apache question

Just to confirm, this is the example I came up to:

<VirtualHost *:80>
    DocumentRoot /var/www/html
    <Directory /var/www/html/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
    </Directory>
</VirtualHost>

Re: Installing Apache question

Hey @sergey_sherstob  yes this is correct while you are creating virtual host then you need to put your directory path with permission inside virtual host tag.hope this works for you