đ Complete Guide - Site Management
Important: All tasks can be completed using only FileBrowser, Nginx Proxy Manager, and phpMyAdmin. No shell access required!
đ Creating a New Website (Live Environment)
Step 1: Create Site Folder
Go to FileBrowser
Navigate to /srv/www/live
Click the "+" button
Select "New Folder"
Name it exactly as your domain: yourdomain.com
Step 2: Upload Website Files
Enter the folder you just created
Click "Upload" button
Upload your website files (HTML, PHP, CSS, JS, etc.)
Make sure you have an index.php or index.html file
Step 3: Configure Nginx Proxy Manager
Step 4: Fill in Details Tab
Domain Names: yourdomain.com
Scheme: http
Forward Hostname / IP: 87.106.10.67
Forward Port: 80
â
Enable "Cache Assets"
â
Enable "Block Common Exploits"
â
Enable "Websockets Support" (if needed)
Step 5: Configure SSL Certificate
Go to the "SSL" tab
Select "Request a new SSL Certificate"
â
Enable "Force SSL"
â
Enable "HTTP/2 Support"
Enter your email address
â
Agree to Let's Encrypt Terms
Step 6: Add FPM Configuration
Go to the "Advanced" tab
Copy the LIVE POOL TEMPLATE from the Templates tab
Paste it into the "Custom Nginx Configuration" box
Step 7: Save and Test
Click "Save"
Wait 10-30 seconds for SSL certificate generation
Visit your domain in a browser
Your website should now be live! đ
đ§ Creating a New Website (Development Environment)
Follow the same steps as above, but with these differences:
Use /srv/www/dev instead of /srv/www/live
Use a development domain like test.yourdomain.com
In the Advanced tab, use the DEV POOL TEMPLATE instead
Note: Dev sites are great for testing before going live. They use a separate PHP-FPM pool with more relaxed settings and error display enabled.
đī¸ Creating a New Database
Step 1: Access phpMyAdmin
Go to phpMyAdmin
You should be automatically logged in
Step 2: Create Database
Click "New" in the left sidebar
Enter database name: yoursite_db
Choose Collation: utf8mb4_general_ci (recommended)
Click "Create"
Step 3: Database Connection Details
Host: localhost
Host: 127.0.0.1
Database Name: yoursite_db
Username: root
Password: [YOUR_PASSWORD]
Port: 3306
Step 4: Test Connection
Update your website's configuration file with these credentials
Test that your website can connect to the database
đ¤ Creating a Separate Database User (Optional)
For better security, you can create a separate user for each database:
Step 1: In phpMyAdmin, select your database from the left sidebar
Step 2: Click the "Privileges" tab
Step 3: Click "Add user account"
Step 4: Fill in the form:
User name: yoursite_user
Host name: Select "Local" (localhost)
Password: Enter a strong password
â
Check "Grant all privileges on database"
Step 5: Scroll down and click "Go"
Step 6: Update your website's config file with the new username and password
đ Migrating a Site from Dev to Live
Step 1: Copy Files
Go to FileBrowser
Navigate to /srv/www/dev/yoursite.com
Click the checkbox at the top to select all files
Click the "Copy" button (đ icon)
Step 2: Paste to Live
Navigate to /srv/www/live
Click the "Paste" button
The folder will be copied to live
Step 3: Rename Folder (if needed)
If your dev domain was test.yoursite.com
Rename the folder to yoursite.com (the live domain)
Click the folder, then click "Rename" button
Step 4: Update Proxy Manager
Go to Nginx Proxy Manager
Create a new proxy host for the live domain
Use the LIVE POOL TEMPLATE in the Advanced tab
Request SSL certificate
Step 5: Update Database Connection (if needed)
If your site uses a database, make sure the config file has the correct database name
Update any hardcoded dev URLs to live URLs
Step 6: Test
Visit your live domain
Test all functionality
Check database connections
Step 7: Clean Up (Optional)
Once confirmed working, you can delete the dev version
Or keep it for future development
đ Migrating a Site from Live to Dev
Reverse process of Dev to Live:
Go to FileBrowser and navigate to /srv/www/live/yoursite.com
Select all files and click "Copy"
Navigate to /srv/www/dev
Click "Paste"
Rename folder to test.yoursite.com or similar
Create proxy host in NPM with DEV POOL TEMPLATE
Update config files if needed (database connections, URLs)
Test the dev site
âī¸ Editing Website Files
Go to FileBrowser
Navigate to your site folder
Click on the file you want to edit
Click the "Edit" button (pencil icon)
Make your changes in the editor
Click "Save"
Refresh your website in the browser to see changes
đ¤ Uploading Files
Go to FileBrowser
Navigate to the destination folder
Click the "Upload" button
Select files or drag and drop them
Wait for upload to complete
Supported: Single files, multiple files, ZIP archives (you can extract them after upload)
đī¸ Deleting a Website
Warning: This action cannot be undone! Make sure you have backups.
Step 1: Remove from Proxy Manager
Go to Nginx Proxy Manager
Find the proxy host for your domain
Click the three dots (âŽ) menu
Click "Delete"
Step 2: Delete Files
Go to FileBrowser
Navigate to the site folder
Select the folder checkbox
Click "Delete" button
Confirm deletion
Step 3: Delete Database (if applicable)
Go to phpMyAdmin
Select the database in the left sidebar
Click "Operations" tab
Scroll to bottom and click "Drop the database"
Confirm deletion
đ Changing File Permissions
Go to FileBrowser
Navigate to the file or folder
Click the "Info" button (âšī¸ icon)
Find the "Permissions" section
Modify the permissions as needed
Click "Save"
Common permissions:
Files: 644 (read/write for owner, read for others)
Folders: 755 (read/write/execute for owner, read/execute for others)
Config files: 600 (read/write for owner only)
đž Viewing and Restoring Backups
View File Backups:
Go to FileBrowser
Navigate to /srv/www/backup
Find your site's folder
You'll see ZIP files named sitename-YYYY-MM-DD.zip
View Database Backups:
Navigate to /srv/www/backup-db
Find your database folder
You'll see compressed SQL files named dbname-YYYY-MM-DD.sql.gz
Restore a File Backup:
Download the backup ZIP file
Extract it on your computer
Upload the files back to the site folder
Restore a Database Backup:
Download the .sql.gz file
Extract it to get the .sql file
Go to phpMyAdmin
Select your database
Click "Import" tab
Choose the .sql file
Click "Go"
Automatic Backups: Your sites are backed up daily at 2:00 AM (files) and 2:30 AM (databases). Backups are kept for 14 days.
đ§ Common Issues & Solutions
Issue: Website shows "502 Bad Gateway"
Check that the Advanced tab in NPM has the correct FPM pool template
Make sure the domain name in NPM matches the folder name exactly
Verify files exist in the correct folder
Issue: PHP files download instead of executing
Make sure you added the FPM pool template in the Advanced tab of NPM
Double-check you're using the correct template (LIVE for live, DEV for dev)
Issue: Database connection failed
Verify the database name exists in phpMyAdmin
Check your config file has the correct credentials
Use localhost or 127.0.0.1 as the host
Make sure MySQL is running (check Dashboard)
Issue: SSL certificate failed
Make sure your domain is pointing to the server IP (87.106.10.67)
Wait for DNS propagation (can take up to 24 hours)
Try requesting the certificate again
Issue: File upload failed
Check file size - maximum is 256MB
Check disk space in Dashboard
Try uploading smaller files or compress them first
đ Important Notes
Backups run automatically - Files at 2:00 AM, Databases at 2:30 AM daily
Backup retention - 14 days, older backups are automatically deleted
FPM pools - Live and Dev use separate pools for isolation
File permissions - Admin user has full access to all files
SSL certificates - Auto-renewed by Let's Encrypt every 90 days
PHP version - 8.3 for both environments
đ Nginx Proxy Manager - FPM Pool Templates
How to use: Copy the appropriate template below and paste it into the "Advanced" tab in Nginx Proxy Manager when creating or editing a proxy host.
đĸ LIVE POOL TEMPLATE
Use this template for all production websites in /srv/www/live
Features:
Production-optimized PHP-FPM pool
Error logging enabled (errors hidden from visitors)
512MB memory limit
256MB upload limit
5-minute execution timeout
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/live-pool.sock;
fastcgi_param SCRIPT_FILENAME /srv/www/live/$host$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /srv/www/live/$host;
fastcgi_index index.php;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
root /srv/www/live/$host;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Block access to hidden files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Block access to sensitive files
location ~ /(composer\.json|composer\.lock|package\.json|package-lock\.json|\.git) {
deny all;
return 404;
}
# Disable caching for dynamic content
location ~ \.php$ {
expires off;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# Enable caching for static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
đ Copy Live Template
đĄ DEV POOL TEMPLATE
Use this template for all development/testing websites in /srv/www/dev
Features:
Development-optimized PHP-FPM pool
Error display enabled (for debugging)
512MB memory limit
256MB upload limit
10-minute execution timeout (longer for debugging)
Caching disabled for easy testing
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/dev-pool.sock;
fastcgi_param SCRIPT_FILENAME /srv/www/dev/$host$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /srv/www/dev/$host;
fastcgi_index index.php;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
}
root /srv/www/dev/$host;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Block access to hidden files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Block access to sensitive files (but allow some for dev)
location ~ /(composer\.json|composer\.lock|package\.json|package-lock\.json) {
# Allow access in dev environment
try_files $uri =404;
}
# Disable ALL caching in dev environment
add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";
# Show errors in dev (for debugging)
fastcgi_intercept_errors off;
đ Copy Dev Template
đ Template Explanation
What do these templates do?
These templates tell Nginx Proxy Manager how to process PHP files and where to find your website files.
Key Variables:
Variable
What it does
$host
Automatically replaced with your domain name (e.g., yoursite.com)
/run/php/live-pool.sock
Path to the Live PHP-FPM socket
/run/php/dev-pool.sock
Path to the Dev PHP-FPM socket
/srv/www/live/$host
Path to your live website files
/srv/www/dev/$host
Path to your dev website files
Why two different templates?
Live Template: Optimized for production - errors are logged but not shown, caching enabled
Dev Template: Optimized for development - errors are displayed, caching disabled, longer timeouts
Process Isolation
Each template uses a different PHP-FPM pool:
Live sites use live-pool - if a dev site crashes, live sites keep running
Dev sites use dev-pool - you can test aggressive code without affecting live sites
đĩ WORDPRESS TEMPLATE (Live)
Use this enhanced template for WordPress sites in /srv/www/live
Note: This template includes WordPress-specific optimizations and security rules.
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/live-pool.sock;
fastcgi_param SCRIPT_FILENAME /srv/www/live/$host$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /srv/www/live/$host;
fastcgi_index index.php;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
root /srv/www/live/$host;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
# WordPress admin-ajax.php
location = /wp-admin/admin-ajax.php {
try_files $uri =404;
fastcgi_pass unix:/run/php/live-pool.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Block WordPress XML-RPC attacks
location = /xmlrpc.php {
deny all;
access_log off;
log_not_found off;
}
# Block access to wp-config.php
location ~* /wp-config.php {
deny all;
}
# Block access to hidden files and directories
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Block access to sensitive WordPress files
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
# Deny access to wp-content/uploads PHP files
location ~* ^/wp-content/uploads/.*\.(php|php5|php7)$ {
deny all;
}
# Cache static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
# Disable caching for dynamic content
location ~ \.php$ {
expires off;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
đ Copy WordPress Template
đĄ Custom Template Tips
Need to modify a template?
You can customize these templates for specific needs:
Increase Upload Size:
# Add this at the top of your custom config
client_max_body_size 512M;
Increase Execution Time:
# Modify these lines in the PHP location block
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
Block Specific User Agents:
# Add this to block bad bots
if ($http_user_agent ~* (SemrushBot|AhrefsBot|Baiduspider) ) {
return 403;
}
Add Custom Headers:
# Add security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
Testing Your Template
Add the template to NPM Advanced tab
Save the proxy host
Visit your website
Check if PHP is working (create a test.php with <?php phpinfo(); ?>)
If errors occur, check the NPM error logs
â ī¸ Important Warnings
Always use the correct template for the environment - Don't use Dev template for Live sites!
Domain name must match folder name - If domain is example.com, folder must be /srv/www/live/example.com
Don't mix environments - Live sites should only use live-pool, Dev sites should only use dev-pool
Test in Dev first - Always test new sites in Dev environment before going Live