Advertisement
KoctrX

Untitled

May 2nd, 2024
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <IfModule mod_ssl.c>
  2. <VirtualHost *:443>
  3.     ServerName darlink.ai
  4.     DocumentRoot /var/www/html
  5.     Header always set Referrer-Policy "same-origin"
  6.     #Alias /static1 /var/www/darlink/public/static
  7.     #Alias /uploads /var/www/darlink/public/uploads
  8.     # Enable the proxy features
  9.     ProxyRequests Off
  10.     <Proxy *>
  11.         Order deny,allow
  12.         Allow from all
  13.     </Proxy>
  14.  
  15. <Location "/">
  16.     AuthType Basic
  17.     AuthName "Restricted Content"
  18.     AuthUserFile /etc/apache2/.htpasswd
  19.     Require valid-user
  20.     <RequireAny>
  21.         Require ip 194.31.175.251
  22. #   Require ip 91.225.196.106
  23.     Require ip 176.115.100.90
  24.     Require ip 37.115.212.198
  25.         Require ip 148.77.2.74
  26.     Require ip 195.238.119.90
  27.     Require ip 18.159.53.253
  28.     #Require ip 188.163.40.119
  29.   #      Require ip 188.163.40.119
  30.         <RequireAll>
  31.             Require valid-user
  32.         </RequireAll>
  33.     </RequireAny>
  34. </Location>
  35.  
  36. <Location "/uploads">
  37.     Require all granted
  38. </Location>
  39.  
  40. <Location "/static-default">
  41.     Require all granted
  42. </Location>
  43.  
  44.     ProxyPass /ws/ ws://localhost:9000/
  45.     ProxyPassReverse /ws/ ws://localhost:9000/
  46.  
  47.     ProxyPass /admin/adminer.php !
  48.     # Forward requests to the local application
  49.     ProxyPass /next http://localhost:3005/
  50.     ProxyPassReverse /next http://localhost:3005/
  51.  
  52.     ProxyPass / http://localhost:4000/
  53.     ProxyPassReverse / http://localhost:4000/
  54.  
  55.     ErrorLog ${APACHE_LOG_DIR}/error.log
  56.     CustomLog ${APACHE_LOG_DIR}/access.log combined
  57. #RewriteEngine on
  58. #RewriteCond %{SERVER_NAME} =femlink.webstaginghub.com
  59. #RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  60. #RewriteEngine On
  61. #RewriteCond %{HTTPS} off
  62. #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  63.  
  64.  
  65. SSLCertificateFile /etc/letsencrypt/live/darlink.ai/fullchain.pem
  66. SSLCertificateKeyFile /etc/letsencrypt/live/darlink.ai/privkey.pem
  67. Include /etc/letsencrypt/options-ssl-apache.conf
  68. </VirtualHost>
  69. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement