logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: What does these lines do in domain.com.conf files?
Author
Kimberley.van.Buyten



Joined: 27 Oct 2021
Posts: 2

PostPosted: Wed 27 Oct '21 10:55    Post subject: What does these lines do in domain.com.conf files? Reply with quote

First of all my domain.com.conf file:

Code:
    DocumentRoot /var/www/domain.com/public_html
    ServerName domain.com
    ServerAlias www.domain.com
    <Directory "/var/www/domain.com/public_html">
      #  Options +SymLinksIfOwnerMatch
        AllowOverride All
      #  Order deny,allow
      #  Allow from all
    </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =domain.com [OR]
RewriteCond %{SERVER_NAME} =www.domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Options FollowSymLinks SymLinksIfOwnerMatch


and this is where I have some question marks! When I have the original config file, the permalinks doesn't work in Wordpress, but when I only add 'AllowOverride All' it's fixed. I guess...

What does all these lines do?
Options +SymLinksIfOwnerMatch
AllowOverride All
Order deny,allow
Allow from all

and what if I remove these lines? Everything works, but is it enough? What does it do? I need some more explanation about these file...

THANKS!!
Back to top
Otomatic



Joined: 01 Sep 2011
Posts: 155
Location: Paris, France, EU

PostPosted: Wed 27 Oct '21 15:21    Post subject: Reply with quote

Hi,

I strongly believe that RTFM is the best option in any case.
- options
- AllowOverride
- Order
- Allow
Although for the latter two and for Apache 2.4, it would be better to use:
- Require

Apache documentation is here: https://httpd.apache.org/docs/2.4/en/
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Wed 03 Nov '21 23:52    Post subject: Reply with quote

# Options +SymLinksIfOwnerMatch
AllowOverride All
# Order deny,allow
# Allow from all

The # disables those lines.

The first one setting the Option to follow the symlink, just as it reads.

AllowOverride all means you can override all settings via .htaccess file.

The last two lines manage the access and it allows all access in the end. However like Otomatic said that is 2.2 syntax. Use Require all granted
Back to top


Reply to topic   Topic: What does these lines do in domain.com.conf files? View previous topic :: View next topic
Post new topic   Forum Index -> Apache