Browse Source

Per VHost access rules

Sven Velt 8 năm trước cách đây
mục cha
commit
8ad64c7f2c

+ 8 - 1
sites-available/001-default-ssl.conf

@@ -1,9 +1,16 @@
 <VirtualHost _default_:443>
 
 	#   General setup for the virtual host
-	DocumentRoot "/srv/www/apache"
 	#ServerName www.example.com:443
 	ServerAdmin webmaster@localhost
+
+	DocumentRoot "/srv/www/apache"
+	<Directory "/srv/www/apache">
+		Options Indexes FollowSymLinks
+		AllowOverride None
+		Require all granted
+	</Directory>
+
 	ErrorLog ${APACHE_LOG_DIR}/001-default-ssl.error.log
 	CustomLog ${APACHE_LOG_DIR}/001-default-ssl.access.log combined
 

+ 8 - 1
sites-available/002-default-ssl.conf

@@ -1,8 +1,15 @@
 <VirtualHost _default_:443>
 
-	DocumentRoot "/srv/www/apache"
 	#ServerName www.example.com:443
 	ServerAdmin webmaster@localhost
+
+	DocumentRoot "/srv/www/apache"
+	<Directory "/srv/www/apache">
+		Options Indexes FollowSymLinks
+		AllowOverride None
+		Require all granted
+	</Directory>
+
 	ErrorLog ${APACHE_LOG_DIR}/002-default-ssl.error.log
 	CustomLog ${APACHE_LOG_DIR}/002-default-ssl.access.log combined