Advertisement
szymski

Untitled

Jan 3rd, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerName szymekk.me
  3. ServerAlias *.szymekk.me
  4.  
  5. #<Directory /var/www/szymekk.me>
  6. # order allow,deny
  7. # allow from all
  8. # RewriteEngine On
  9.  
  10. # RewriteCond %{REQUEST_FILENAME} -s [OR]
  11. # RewriteCond %{REQUEST_FILENAME} -l [OR]
  12. # RewriteCond %{REQUEST_FILENAME} -d
  13. # RewriteRule ^.*$ - [NC,L]
  14. # RewriteRule ^(.*) /index.html [NC,L]
  15. # </Directory>
  16.  
  17. <Location /api>
  18. RewriteEngine off
  19. ProxyPreserveHost On
  20. ProxyPass http://localhost:5000/api
  21. ProxyPassReverse http://localhost:5000/api
  22. </Location>
  23.  
  24. RewriteEngine On
  25. RewriteMap lowercase int:tolower
  26. RewriteRule ^(/var/www/[^/]+/.*)$ $1 [L]
  27. RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
  28. RewriteRule ^(www\.)?([^/]+)/(.*)$ /var/www/$2/$3 [L,E=VHOST_ROOT:/var/www/$2/]
  29. #Redirect permanent / https://szymekk.me/
  30. #RewriteCond %{SERVER_NAME} =szymekk.me
  31. #RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  32. </VirtualHost>
  33.  
  34. <VirtualHost *:81>
  35. ProxyPreserveHost On
  36. ProxyPass / http://localhost:5000/
  37. ProxyPassReverse / http://localhost:5000/
  38. ServerName www.szymekk.me
  39. ServerAlias *.szymekk.me
  40. ErrorLog ${APACHE_LOG_DIR}hellomvc-error.log
  41. CustomLog ${APACHE_LOG_DIR}hellomvc-access.log common
  42. RewriteEngine on
  43. RewriteCond %{SERVER_NAME} =*.szymekk.me [OR]
  44. RewriteCond %{SERVER_NAME} =szymekk.me
  45. RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  46. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement