mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-11 05:44:45 -06:00
Merge pull request #41 from tenten8401/patch-4
Add rudimentary Apache SSL configuration
This commit is contained in:
commit
2590d3db3c
10
.snippets/webservers/apache-nossl.conf
Normal file
10
.snippets/webservers/apache-nossl.conf
Normal 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>
|
||||||
@ -1,4 +1,10 @@
|
|||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
|
ServerName <domain>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{HTTPS} !=on
|
||||||
|
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
||||||
|
</VirtualHost>
|
||||||
|
<VirtualHost *:443>
|
||||||
ServerName <domain>
|
ServerName <domain>
|
||||||
DocumentRoot "/var/www/pterodactyl/public"
|
DocumentRoot "/var/www/pterodactyl/public"
|
||||||
AllowEncodedSlashes On
|
AllowEncodedSlashes On
|
||||||
@ -7,4 +13,7 @@
|
|||||||
<Directory "/var/www/pterodactyl/public">
|
<Directory "/var/www/pterodactyl/public">
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
</Directory>
|
</Directory>
|
||||||
</VirtualHost>
|
SSLEngine on
|
||||||
|
SSLCertificateFile /etc/letsencrypt/live/<domain>/fullchain.pem
|
||||||
|
SSLCertificateKeyFile /etc/letsencrypt/live/<domain>/privkey.pem
|
||||||
|
</VirtualHost>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ You should paste the contents of the file below, replacing `<domain>` with your
|
|||||||
### NGINX With SSL
|
### NGINX With SSL
|
||||||
This configuration assumes that you will be using SSL on both the Panel and Daemons for significantly improved communication
|
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
|
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}
|
<<< @/.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
|
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 — if on CentOS, `/etc/httpd/conf.d/`.
|
`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
|
### 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
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user