Web Server Apache Nginx



This Version is End-of-Life

This documentation is for end-of-life software which does not recieve any security updates or supportfrom the community. This documentation has been left accessible for historial reasons.

Web Server Apache Vs Nginx

You should be installing and using Pterodactyl Panel 1.0 in production environments.

Web
  • NGINX
  • Apache

Oct 09, 2015 The Apache HTTP server and NGINX are the two most popular open source web servers powering the Internet today. When Igor Sysoev began working on NGINX over 10 years ago, no one expected that the project he created for the purpose of accelerating a large Apache‑based service would grow to have the influence it has now. Nginx Vs Apache is an age-old debate. Both these servers are industry leaders, serving more than 50% of all web pages on the internet combined. Though they’re members of the same industry and serve similar purposes, each follows a different set of dynamics towards achieving their end goal, i.e., serving web pages. The Apache HTTP server was designed as a web server. On the other hand, NGINX offers web as well as proxy server functions. This difference in focus is reflected in the way that the software interprets client requests and allocated resources on the server.

DANGER

The Apache web server must be previously installed on your VPS. Step-1: Remove the Apache Web Server. Before installing the NGINX you will remove the Apache web server to avoids conflict between them. First of all you will stop the Apache service before removing the Apache web server. This enables us to remove the Apache without any issues. NGiNX – It’s less yet important features and modules make it lighter, smarter and better web server than Apache. Flexibility is one of the most important concerns when it comes to a web server. Apache vs Nginx flexibility has some interesting differences. Supports customization of web server through dynamic modules.

You should remove the default Apache or NGINX configuration as it will expose application secrets to malicioususers by default.

Nginx web server configuration

# NGINX

You should paste the contents of the file below, replacing <domain> with your domain name being used in a file calledpterodactyl.conf and place it in /etc/nginx/sites-available/, or — if on CentOS, /etc/nginx/conf.d/.

# NGINX With SSL

Apache nginx web server

This configuration assumes that you will be using SSL on both the Panel and Daemons for significantly improved communicationsecurity between users and the Panel. You will need to get a valid SSL certificate which can be done for free by usingLet's Encrypt.

WARNING

When using the SSL configuration you MUST create SSL certificates, otherwise your NGINX will fail to start. See Creating SSL Certificates documentation page for how to create these certificates before continuing.




Continue reading to the bottom of this section for the final steps with NGINX!

# NGINX Without SSL


# Enabling Configuration

The final step is to enable your NGINX configuration and restart it.

# Apache

You should paste the contents of the file below, replacing <domain> with your domain name being used in a file calledpterodactyl.conf and place it 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.

# Apache With SSL

Like the nginx configuration, this assumes you will be using SSL on both the Panel and Daemons for improved security.

WARNING

Free Web Server Apache

When using the SSL configuration you MUST create SSL certificates, otherwise your Apache will fail to start. See Creating SSL Certificates documentation page for how to create these certificates before continuing.




# Apache Without SSL


# 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 commandsbelow! You only need to run systemctl restart httpd.