Created
August 13, 2018 08:59
-
-
Save MksYi/c2be6f301da4422f6ac6628e507aa448 to your computer and use it in GitHub Desktop.
Django + Apache2.4 conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ErrorLog /home/<User_Name>/MyProject/logs/error.log | |
CustomLog /home/<User_Name>/MyProject/logs/access.log combined | |
WSGIScriptAlias / /home/<User_Name>/MyProject/MyProject/wsgi.py | |
Alias /static/ /home/<User_Name>/MyProject/static/ | |
Alias /templates/ /home/<User_Name>/MyProject/templates/ | |
<Directory /home/<User_Name>/MyProject> | |
Options FollowSymLinks | |
Order deny,allow | |
Require all granted | |
</Directory> | |
<Directory /home/<User_Name>/MyProject/MyProject> | |
<Files wsgi.py> | |
Order deny,allow | |
# 限制所有人存取 包括本機 | |
Require all denied | |
# 開放所有人存取 | |
# Allow from all | |
# 開放本機器存取 | |
Require ip 127.0.0.1 | |
# 開放其他 IP 或 網段存取 | |
# Require 10.0.0.1 192.168 172 | |
</Files> | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment