Browse Source

add apache conf

tripeur 2 years ago
parent
commit
f1224ac6a1
1 changed files with 49 additions and 0 deletions
  1. 49 0
      bdlg2023.conf

+ 49 - 0
bdlg2023.conf

@@ -0,0 +1,49 @@
+<VirtualHost *:80>
+    ServerAdmin clovis@jaquin.fr
+    ServerName bdlg-planner.jaquin.fr
+    DocumentRoot /home/clovis/bdlg-2023/www
+    <Directory /home/clovis/bdlg-2023/www>
+        AllowOverride All
+    </Directory>
+    Redirect 301 / https://bdlg-planner.jaquin.fr/
+    
+RewriteEngine on
+RewriteCond %{SERVER_NAME} =bdlg-planner.jaquin.fr
+RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
+</VirtualHost>
+
+<VirtualHost *:443>
+    ServerAdmin clovis@jaquin.fr
+    ServerName bdlg-planner.jaquin.fr
+    DocumentRoot /home/clovis/bdlg-2023/www
+        
+    ProxyPreserveHost On
+    ProxyRequests off
+    ProxyPass /api/ http://127.0.0.1:8071/
+    ProxyPassReverse /api/ http://127.0.0.1:8071/
+    
+    <Location />
+        RewriteEngine on
+        RewriteCond %{REQUEST_FILENAME} !-d
+        RewriteCond %{REQUEST_FILENAME} !-f
+        RewriteCond %{REQUEST_URI} !^/api
+        RewriteRule . /index.html [L]
+    </Location>
+
+   <Directory /home/clovis/bdlg-2023/www>
+        Require all granted
+        Order allow,deny
+        Allow from all
+    </Directory>
+    
+    
+    
+    SSLCertificateFile /etc/letsencrypt/live/bdlg-planner.jaquin.fr/fullchain.pem
+    SSLCertificateKeyFile /etc/letsencrypt/live/bdlg-planner.jaquin.fr/privkey.pem
+    Include /etc/letsencrypt/options-ssl-apache.conf
+
+    ErrorLog ${APACHE_LOG_DIR}/bdlg2023_error.log
+    LogLevel debug
+    CustomLog ${APACHE_LOG_DIR}/bdlg2023_access.log combined
+</VirtualHost>
+