|
|
@@ -1,16 +1,35 @@
|
|
|
-<VirtualHost *:80>
|
|
|
- # Add machine's IP address (use ifconfig command)
|
|
|
- ServerName 127.0.0.1
|
|
|
- # Give an alias to to start your website url with
|
|
|
- WSGIDaemonProcess app threads=5
|
|
|
- WSGIScriptAlias / /home/will/GitHub/CustomBuild/app.wsgi
|
|
|
- <Directory /home/will/GitHub/CustomBuild/>
|
|
|
- # set permissions as per apache2.conf file
|
|
|
- Options FollowSymLinks
|
|
|
- AllowOverride None
|
|
|
- Require all granted
|
|
|
- </Directory>
|
|
|
- ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
|
- LogLevel warn
|
|
|
- CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
+
|
|
|
+<VirtualHost *:443>
|
|
|
+ ServerName custom.ardupilot.org
|
|
|
+
|
|
|
+ WSGIDaemonProcess app threads=5
|
|
|
+ WSGIScriptAlias / /home/custom/CustomBuild/app.wsgi
|
|
|
+ WSGIScriptAlias /generate /home/custom/CustomBuild/app.wsgi
|
|
|
+ <Directory /home/custom/CustomBuild/>
|
|
|
+ Options FollowSymLinks
|
|
|
+ AllowOverride None
|
|
|
+ Require all granted
|
|
|
+ </Directory>
|
|
|
+
|
|
|
+ Alias /builds /home/custom/base/builds
|
|
|
+ <Directory /home/custom/base/>
|
|
|
+ Options FollowSymLinks Indexes
|
|
|
+ AllowOverride None
|
|
|
+ Require all granted
|
|
|
+ </Directory>
|
|
|
+
|
|
|
+ ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
|
+ LogLevel warn
|
|
|
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
+ SSLCertificateFile /etc/letsencrypt/live/custom.ardupilot.org/fullchain.pem
|
|
|
+ SSLCertificateKeyFile /etc/letsencrypt/live/custom.ardupilot.org/privkey.pem
|
|
|
+ Include /etc/letsencrypt/options-ssl-apache.conf
|
|
|
</VirtualHost>
|
|
|
+
|
|
|
+<VirtualHost *:80>
|
|
|
+ ServerName custom.ardupilot.org
|
|
|
+ RewriteEngine On
|
|
|
+
|
|
|
+ RewriteCond %{SERVER_NAME} =custom.ardupilot.org
|
|
|
+ RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
|
+</VirtualHost>
|