Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save perisicnikola37/d6693132810a2706ab9bfebc64a6a641 to your computer and use it in GitHub Desktop.
Save perisicnikola37/d6693132810a2706ab9bfebc64a6a641 to your computer and use it in GitHub Desktop.
apache_server_configuration_file
GNU nano 7.2 000-default-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/academix-learning-system-backend/public
<Directory /var/www/html/academix-learning-system-backend/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName academix.me
SSLCertificateFile /etc/letsencrypt/live/academix.me/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/academix.me/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/academix-learning-system-backend/public
<Directory /var/www/html/academix-learning-system-backend/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =academix.me
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment