diff --git a/.snippets/webservers/apache-nossl.conf b/.snippets/webservers/apache-nossl.conf new file mode 100644 index 00000000..d0fe8bdc --- /dev/null +++ b/.snippets/webservers/apache-nossl.conf @@ -0,0 +1,10 @@ + + ServerName + DocumentRoot "/var/www/pterodactyl/public" + AllowEncodedSlashes On + php_value upload_max_filesize 100M + php_value post_max_size 100M + + AllowOverride all + + diff --git a/.snippets/webservers/apache.conf b/.snippets/webservers/apache.conf index d0fe8bdc..bb48ae95 100644 --- a/.snippets/webservers/apache.conf +++ b/.snippets/webservers/apache.conf @@ -1,4 +1,10 @@ + ServerName + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] + + ServerName DocumentRoot "/var/www/pterodactyl/public" AllowEncodedSlashes On @@ -7,4 +13,7 @@ AllowOverride all - + SSLEngine on + SSLCertificateFile /etc/letsencrypt/live//fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live//privkey.pem + diff --git a/panel/webserver_configuration.md b/panel/webserver_configuration.md index 93a57ebe..eda12014 100644 --- a/panel/webserver_configuration.md +++ b/panel/webserver_configuration.md @@ -14,7 +14,7 @@ You should paste the contents of the file below, replacing `` with your ### NGINX With SSL This configuration assumes that you will be using SSL on both the Panel and Daemons for significantly improved communication security between users and the Panel. You will need to get a valid SSL certificate which can be done for free by using -Let's Encrypt. Please see our Creating SSL Certificates documentation for how to create these certificates before continuing. +Let's Encrypt. Please see our [Creating SSL Certificates](/tutorials/creating_ssl_certificates.html) documentation page for how to create these certificates before continuing. <<< @/.snippets/webservers/nginx.conf{5,11,26-27} @@ -38,7 +38,14 @@ systemctl restart nginx You should paste the contents of the file below, replacing `` with your domain name being used in a file called `pterodactyl.conf` and place it in `/etc/apache2/sites-available`, or — if on CentOS, `/etc/httpd/conf.d/`. -<<< @/.snippets/webservers/apache.conf{2} +### Apache With SSL +Like the nginx configuration, this assumes you will be using SSL on both the Panel and Daemons for improved security. You will need to visit our [Creating SSL Certificates](/tutorials/creating_ssl_certificates.html) documentation page on how to create these certificates. + +<<< @/.snippets/webservers/apache.conf{2,8,17-18} + +### Apache Without SSL + +<<< @/.snippets/webservers/apache-nossl.conf{2} ### Enabling Configuration Once you've created the file above, simply run the commands below. If you are on CentOS _you do not need to run the commands