Skip to content

Webserver egg - #100

Open
GGLVXD wants to merge 6 commits into
pterodactyl:mainfrom
GGLVXD:main
Open

Webserver egg#100
GGLVXD wants to merge 6 commits into
pterodactyl:mainfrom
GGLVXD:main

Conversation

@GGLVXD

@GGLVXD GGLVXD commented Aug 1, 2026

Copy link
Copy Markdown

Nginx webserver with php, and wordpress autoinstall

Copilot AI review requested due to automatic review settings August 1, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “webserver egg” that provisions an Nginx + PHP-FPM webserver setup (with optional Composer and WordPress download) for the application-eggs collection.

Changes:

  • Introduces a full Nginx configuration set and startup scripts to run PHP-FPM + Nginx inside the container.
  • Adds PHP-FPM pool and php.ini configuration plus session storage scaffolding.
  • Adds an exported Pterodactyl egg JSON including install-time WordPress download and runtime Composer support.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
webserver/README.md Adds basic documentation for the new egg.
webserver/files/www/index.php Adds a default PHP page for the web root.
webserver/files/start.sh Entry script to optionally run Composer then start the web stack.
webserver/files/core/php/sessions/.gitignore Keeps session directory in repo while ignoring session files.
webserver/files/core/php/pool.d/www.conf Defines the PHP-FPM pool configuration and socket path.
webserver/files/core/php/php.ini Provides a full php.ini tuned for container paths and logging.
webserver/files/core/php/php-fpm.conf Configures global PHP-FPM settings and pool include path.
webserver/files/core/nginx/win-utf Adds nginx charset map support file.
webserver/files/core/nginx/uwsgi_params Adds default uWSGI parameter mapping file.
webserver/files/core/nginx/snippets/snakeoil.conf Adds snippet for self-signed cert paths.
webserver/files/core/nginx/snippets/fastcgi-php.conf Adds FastCGI PHP snippet configuration.
webserver/files/core/nginx/scgi_params Adds default SCGI parameter mapping file.
webserver/files/core/nginx/proxy_params Adds default proxy header parameter file.
webserver/files/core/nginx/nginx.conf Adds main nginx.conf for the containerized webserver.
webserver/files/core/nginx/mime.types Adds mime.types used by nginx.conf.
webserver/files/core/nginx/koi-win Adds nginx charset map support file.
webserver/files/core/nginx/koi-utf Adds nginx charset map support file.
webserver/files/core/nginx/fastcgi.conf Adds fastcgi.conf for SCRIPT_FILENAME and other params.
webserver/files/core/nginx/fastcgi_params Adds default FastCGI parameter mapping file.
webserver/files/core/nginx/conf.d/default.conf Adds the default server block, PHP handling, and deny rules.
webserver/files/core/nginx.sh Starts PHP-FPM and then launches Nginx with configured paths.
webserver/files/core/composer.sh Adds optional Composer install/require behavior based on env vars.
webserver/egg-webserver-egg.json Adds the exported Pterodactyl egg definition and install script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1 @@
<?php phpinfo(); ?> No newline at end of file

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really? its a fresh install

Comment thread webserver/files/core/nginx/conf.d/default.conf
Comment thread webserver/files/core/php/php.ini Outdated
; or per-virtualhost web server configuration file.
; Note: disables the realpath cache
; https://php.net/open-basedir
open_basedir = /home/container:/core/tmp
Comment thread webserver/files/core/php/php.ini Outdated
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
; portable libs/applications.
; https://php.net/mbstring.enco<?php
Comment thread webserver/files/core/composer.sh Outdated
Comment on lines +36 to +39
echo "[Composer] composer.json not found. Installing from COMPOSER_MODULES: $COMPOSER_MODULES"
composer require $COMPOSER_MODULES \
--working-dir="$WWW_DIR" \
--no-interaction
Comment thread webserver/files/core/nginx/nginx.conf Outdated
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n\r\nset -u\r\n\r\n# [SETUP] Install necessary packages, including git\r\necho -e \"[SETUP] Install packages\"\r\napt-get update -qq > \/dev\/null 2>&1\r\napt-get install -qq > \/dev\/null 2>&1 -y git wget perl perl-doc fcgiwrap pkg-php-tools\r\n\r\n\r\n#redis\r\napt-get install -qq -y php-redis\r\n\r\n# Change to server directory\r\ncd \/mnt\/server\r\n\r\n# [SETUP] Create necessary folders\r\necho -e \"[SETUP] Create folders\"\r\nmkdir -p logs\r\n\r\n# Clone only the required directory from the repository\r\necho \"[Git] Cloning webserver\/files from application-eggs repository.\"\r\ngit clone --filter=blob:none --sparse https:\/\/github.com\/pterodactyl\/application-eggs.git \/mnt\/server\/gtemp > \/dev\/null 2>&1 && echo \"[Git] Repository cloned successfully.\" || { echo \"[Git] Error: Repository clone failed.\"; exit 21; }\r\n\r\ncd \/mnt\/server\/gtemp\r\n\r\necho \"[Git] Checking out webserver\/files directory.\"\r\ngit sparse-checkout set webserver\/files > \/dev\/null 2>&1 || { echo \"[Git] Error: Sparse checkout failed.\"; exit 22; }\r\n\r\n# Copy the contents of webserver\/files into \/home\/container\r\necho \"[Git] Copying webserver\/files contents to \/home\/container.\"\r\ncp -r \/mnt\/server\/gtemp\/webserver\/files\/* \/mnt\/server || { echo \"[Git] Error: Copying files failed.\"; exit 23; }\r\n\r\necho \"[Git] Files copied successfully.\"\r\n\r\nchmod +x \/mnt\/server\/start.sh\r\nchmod +x \/mnt\/server\/core\/nginx.sh\r\nchmod +x \/mnt\/server\/core\/composer.sh\r\n\r\n# Remove the temporary cloned repository\r\nrm -rf \/mnt\/server\/gtemp\r\n\r\n#create temporary directory\r\nmkdir -p \/mnt\/server\/core\/tmp\r\n\r\n# Check if WordPress should be installed\r\nif [ \"${WORDPRESS}\" == \"true\" ] || [ \"${WORDPRESS}\" == \"1\" ]; then\r\n echo \"[SETUP] Install WordPress\"\r\n cd \/mnt\/server\/www\r\n wget -q http:\/\/wordpress.org\/latest.tar.gz > \/dev\/null 2>&1 || { echo \"[SETUP] Error: Downloading WordPress failed.\"; exit 16; }\r\n tar xzf latest.tar.gz > \/dev\/null 2>&1\r\n mv wordpress\/* .\r\n rm -rf wordpress latest.tar.gz\r\n echo \"[SETUP] WordPress installed - http:\/\/ip:port\/wp-admin\"\r\nfi\r\n\r\n\r\necho -e \"[DONE] Everything has been installed successfully\"\r\necho -e \"[INFO] You can now start the nginx web server\"",
Comment thread webserver/files/core/php/php.ini Outdated
; Development Value: 1
; Production Value: 1
; https://php.net/session.gc-probability
session.gc_probability = 0
Comment thread webserver/README.md
Comment on lines +4 to +6
Use this egg to run a lightweight webserver with PHP support.

Base scripts credit: https://github.com/Ym0T/pterodactyl-nginx-egg No newline at end of file
GGLVXD and others added 2 commits August 1, 2026 21:28
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants