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
# add to .htaccess root | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^$ public/index.php [L] | |
RewriteRule ^((?!public/).*)$ public/$1 [L,NC] | |
</IfModule> |
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
# Redirect www to non-www | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] | |
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] |
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
# Paste this service file in | |
# /etc/systemd/system | |
[Service] | |
User=user_name | |
Group=group_name | |
EnvironmentFile=/home/vars.ini | |
WorkingDirectory=/home/path_to_django_root_dir | |
Environment="PATH=/home/path_to_virtual_env_dir/bin" | |
Restart=always |
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
# Paste this service file in | |
# /etc/systemd/system | |
[Service] | |
User=username | |
Group=groupname | |
EnvironmentFile=/home/vars.ini | |
WorkingDirectory=/home/path_to_django_root | |
Environment="PATH=/home/path_to_virtual_enviornment_dir/env/bin" | |
Restart=always |