3.8 KiB
Webserver Configuration
::: warning When using the SSL configuration you MUST create SSL certificates, otherwise your webserver will fail to start. See the Creating SSL Certificates documentation page to learn how to create these certificates before continuing. :::
:::: tabs ::: tab "Nginx With SSL" First, remove the default NGINX configuration.
rm /etc/nginx/sites-enabled/default
Now, 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 the file in /etc/nginx/sites-available/, or — if on CentOS, /etc/nginx/conf.d/.
<<< @/.snippets/webservers/nginx-php8.1.conf{5,11,26-27}
Enabling Configuration
The final step is to enable your NGINX configuration and restart it.
# You do not need to symlink this file if you are using CentOS.
sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
# You need to restart nginx regardless of OS.
sudo systemctl restart nginx
::: ::: tab "Nginx Without SSL" First, remove the default NGINX configuration.
rm /etc/nginx/sites-enabled/default
Now, 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 the file in /etc/nginx/sites-available/, or — if on CentOS, /etc/nginx/conf.d/.
<<< @/.snippets/webservers/nginx-php8.1-nossl.conf{4}
Enabling Configuration
The final step is to enable your NGINX configuration and restart it.
# You do not need to symlink this file if you are using CentOS.
sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
# You need to restart nginx regardless of OS.
sudo systemctl restart nginx
::: ::: tab "Apache With SSL" First, remove the default Apache configuration.
a2dissite 000-default.conf
Now, 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 the file in /etc/apache2/sites-available, or — if on CentOS, /etc/httpd/conf.d/.
Note: When using Apache, make sure you have the libapache2-mod-php package installed or else PHP will not display on your webserver.
<<< @/.snippets/webservers/apache.conf{2,10,24-25}
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
below! You only need to run systemctl restart httpd.
# You do not need to run any of these commands on CentOS
sudo ln -s /etc/apache2/sites-available/pterodactyl.conf /etc/apache2/sites-enabled/pterodactyl.conf
sudo a2enmod rewrite
sudo a2enmod ssl
sudo systemctl restart apache2
::: ::: tab "Apache Without SSL" First, remove the default Apache configuration.
a2dissite 000-default.conf
Now, 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 the file in /etc/apache2/sites-available, or — if on CentOS, /etc/httpd/conf.d/.
Note: When using Apache, make sure you have the libapache2-mod-php package installed or else PHP will not display on your webserver.
<<< @/.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
below! You only need to run systemctl restart httpd.
# You do not need to run any of these commands on CentOS
sudo ln -s /etc/apache2/sites-available/pterodactyl.conf /etc/apache2/sites-enabled/pterodactyl.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
::: ::::