Răsfoiți Sursa

Updated config file (final GSoC commit)

Will Piper 4 ani în urmă
părinte
comite
75a5cc39c7
1 a modificat fișierele cu 34 adăugiri și 15 ștergeri
  1. 34 15
      CustomBuild.conf

+ 34 - 15
CustomBuild.conf

@@ -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>