diff --git a/config/backend.sdslabs.conf b/config/backend.sdslabs.conf index 81a2485..cb8e2b6 100644 --- a/config/backend.sdslabs.conf +++ b/config/backend.sdslabs.conf @@ -1,12 +1,29 @@ - # ProxyPreserveHost On - # Servers to proxy the connection, or; - # List of application servers: - # Usage: - # ProxyPass / http://[IP Addr.]:[port]/ - # ProxyPassReverse / http://[IP Addr.]:[port]/ - # Example: - ProxyPass / http://127.0.0.1:8000/ - ProxyPassReverse / http://127.0.0.1:8000/ + # ProxyPass / http://127.0.0.1:8000/ + # ProxyPassReverse / http://127.0.0.1:8000/ ServerName portfolio-backend.sdslabs.co + Alias /static /home/portfolio/portfolio/staticfiles + + Require all granted + + + Alias /media/projects /home/portfolio/portfolio/media/projects + + Require all granted + + + Alias /media/news /home/portfolio/portfolio/media/news + + Require all granted + + + + + Require all granted + + + + WSGIDaemonProcess portfolio python-path=/home/portfolio/portfolio python-home=/home/portfolio/portfolio/venv + WSGIProcessGroup portfolio + WSGIScriptAlias / /home/portfolio/portfolio/portfolio/wsgi.py diff --git a/config/portfolio.sdslabs.conf b/config/portfolio.sdslabs.conf index 38c185a..ae2a7d0 100644 --- a/config/portfolio.sdslabs.conf +++ b/config/portfolio.sdslabs.conf @@ -1,26 +1,22 @@ - # ProxyPreserveHost On - # Servers to proxy the connection, or; - # List of application servers: - # Usage: - # ProxyPass / http://[IP Addr.]:[port]/ - # ProxyPassReverse / http://[IP Addr.]:[port]/ - # Example: - ProxyPass / http://127.0.0.1:8080/ - ProxyPassReverse / http://127.0.0.1:8080/ ServerName portfolio-beta.sdslabs.co - DocumentRoot /home/d3mon/Projects/portfolio/frontend/src - + DocumentRoot /home/portfolio/portfolio/frontend/dist + Options -Indexes -MultiViews Allowoverride all Require all granted - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} -f [OR] - RewriteCond %{REQUEST_FILENAME} -d - RewriteRule ^(.*)$ - [QSA,L] - RewriteRule ^api/(.*)$ http://localhost:8000/api/$1 [END] - RewriteRule ^(.*)$ http://localhost:8080/$1 [P] - + Order allow,deny + allow from all + + + RewriteEngine On + RewriteBase / + RewriteRule ^index\.html$ - [L] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule . /index.html [L] + + ErrorLog ${APACHE_LOG_DIR}/portfolio.error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/portfolio.access.log combined