Merge pull request #41 from tenten8401/patch-4

Add rudimentary Apache SSL configuration
This commit is contained in:
Dane Everitt 2018-10-27 11:46:25 -07:00 committed by GitHub
commit 2590d3db3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 3 deletions

View File

@ -0,0 +1,10 @@
<VirtualHost *:80>
ServerName <domain>
DocumentRoot "/var/www/pterodactyl/public"
AllowEncodedSlashes On
php_value upload_max_filesize 100M
php_value post_max_size 100M
<Directory "/var/www/pterodactyl/public">
AllowOverride all
</Directory>
</VirtualHost>

View File

@ -1,4 +1,10 @@
<VirtualHost *:80>
ServerName <domain>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
ServerName <domain>
DocumentRoot "/var/www/pterodactyl/public"
AllowEncodedSlashes On
@ -7,4 +13,7 @@
<Directory "/var/www/pterodactyl/public">
AllowOverride all
</Directory>
</VirtualHost>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/<domain>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<domain>/privkey.pem
</VirtualHost>

View File

@ -14,7 +14,7 @@ You should paste the contents of the file below, replacing `<domain>` 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 `<domain>` with your domain name being used in a file called
`pterodactyl.conf` and place it in `/etc/apache2/sites-available`, or &mdash; 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