Skip to content

Commit

Permalink
Add some missing comments and correct highlighting in conf blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
danny6167 committed Jul 8, 2024
1 parent 3b584ac commit 5069e66
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .snippets/webservers/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
}
}

# Replace the example <domain> with your domain name or IP address
<domain> {
root * /var/www/pterodactyl/public

Expand Down
1 change: 1 addition & 0 deletions .snippets/webservers/Caddyfile-nossl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
}
}

# Replace the example <domain> with your domain name or IP address
<domain>:80 {
root * /var/www/pterodactyl/public

Expand Down
1 change: 1 addition & 0 deletions .snippets/webservers/apache-nossl.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<VirtualHost *:80>
# Replace the example <domain> with your domain name or IP address
ServerName <domain>
DocumentRoot "/var/www/pterodactyl/public"

Expand Down
2 changes: 2 additions & 0 deletions .snippets/webservers/apache.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<VirtualHost *:80>
# Replace the example <domain> with your domain name or IP address
ServerName <domain>

RewriteEngine On
Expand All @@ -7,6 +8,7 @@
</VirtualHost>

<VirtualHost *:443>
# Replace the example <domain> with your domain name or IP address
ServerName <domain>
DocumentRoot "/var/www/pterodactyl/public"

Expand Down
10 changes: 5 additions & 5 deletions panel/1.0/webserver_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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 &mdash; if on RHEL, Rocky Linux, or AlmaLinux, `/etc/nginx/conf.d/`.

<<< @/.snippets/webservers/nginx-php8.3.conf{5,11,26-27}
<<< @/.snippets/webservers/nginx-php8.3.conf{4,11,26-27}

### Enabling Configuration

Expand Down Expand Up @@ -71,7 +71,7 @@ Now, you should paste the contents of the file below, replacing `<domain>` with

Note: When using Apache, make sure you have the `libapache2-mod-php8.3` package installed or else PHP will not display on your webserver.

<<< @/.snippets/webservers/apache.conf{2,10,24-25}
<<< @/.snippets/webservers/apache.conf{3,12,26-27}

### Enabling Configuration

Expand Down Expand Up @@ -99,7 +99,7 @@ Now, you should paste the contents of the file below, replacing `<domain>` with

Note: When using Apache, make sure you have the `libapache2-mod-php8.3` package installed or else PHP will not display on your webserver.

<<< @/.snippets/webservers/apache-nossl.conf{2}
<<< @/.snippets/webservers/apache-nossl.conf{3}

### Enabling Configuration

Expand Down Expand Up @@ -127,7 +127,7 @@ Then continue with an editor of your choice to write the config.

You should paste the contents of the file below, replacing `<domain>` with your domain name.

<<< @/.snippets/webservers/Caddyfile{9}
<<< @/.snippets/webservers/Caddyfile{10}

::: tip
If you are using Cloudflare DNS in proxy mode, refer to [this tutorial](/tutorials/creating_ssl_certificates.html#method-3:-caddy-(using-cloudflare-api)), to see how to configure Caddy to use DNS challenge for obtaining SSL certificates.
Expand Down Expand Up @@ -157,7 +157,7 @@ You should paste the contents of the file below, replacing `<domain>` with your

The only two differences are that we have suffixed the `<domain>` with `:80` and in the global config at `servers` directive, we have changed the port from `:443` to `:80`.

<<< @/.snippets/webservers/Caddyfile-nossl{9}
<<< @/.snippets/webservers/Caddyfile-nossl{10}

### Enabling Configuration

Expand Down

0 comments on commit 5069e66

Please sign in to comment.