Linux Tutorial | Matt Cooper - Open Source Support
Linux Tutorial | Matt Cooper - Open Source Support
Nginx, WordPress Tutorial

WordPress – Perfect Permissions

Set the perfect permissions for WordPress:

cd /path/to/wp/webroot; find . -type d -print0|xargs -0 chmod 755; find . -type f -print0|xargs -0 chmod 644; chown nginx:nginx * -R

*Update nginx:nginx to your web daemon user and group

August 16, 2019by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Nginx, PHP, WordPress Tutorial

unable to create directory wp-content/uploads – WordPress nginx php-fpm

Recently had an issue where I was unable to upload media within WordPress. Turned out the user and group in php-fpm’s www.conf was incorrect. To fix:

vim /etc/php-fpm.d/www.conf

user: nginx
group: nginx

Restart php-fpm

service php-fpm restart
August 16, 2019by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon
Nginx

Enable Nginx server status page

1. Check the nginx stub_status_module is enabled:

nginx -V 2>&1 | grep -o with-http_stub_status_module

This should result in:

with-http_stub_status_module

If not, install nginx with stub_status_module enabled.

2. Add the following code to the server block:

server {
listen 80 default_server;
# Define the document root of the server e.g /var/www/html
root /var/www/html;
location /nginx_status {
# Enable Nginx stats
stub_status on;
# Only allow access from your IP e.g 1.1.1.1 or localhost #
allow 127.0.0.1;
allow 1.1.1.1
# Other request should be denied
deny all;
}

*Set allow IP to the sources you need access from*

3. Browse to http(s)://example.com/nginx_status

Credit goes to – https://www.keycdn.com/support/nginx-status/

March 12, 2018by Matt Cooper
FacebookTwitterPinterestGoogle +Stumbleupon

About me

Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@linuxtutorial.co.uk

Recent Comments

  • Andrew on Export list of Amazon EC2 Instances to CSV
  • Matt Cooper on Proxmox – add a second hard drive to node for Backups
  • karis on Proxmox – add a second hard drive to node for Backups
  • Matt Cooper on Remote MySQL Database – Slow Connection
  • Matt Cooper on Bash script to send public IP address to Email

Categories

  • AdvancedTomato
  • Amazon AWS
  • Amazon Linux
  • Amazon S3
  • Apache
  • Backup Tutorial
  • Bash Scripting
  • Centos Tutorial
  • CloudFlare
  • Command line Tutorial
  • CPanel Troubleshooting
  • CPanel Tutorial
  • Debian Troubleshooting
  • Debian Tutorial
  • DKIM
  • Docker
  • EC2
  • ESXi
  • Faildows
  • Google Adwords
  • Google Analytics
  • Google Chromebook
  • Google Mail
  • graylog
  • IAM
  • imapsync
  • iRedmail Tutorial
  • ISPConfig3 Tutorial
  • Java
  • ldap
  • letsencrypt
  • MyDNS
  • MySQL Troubleshooting
  • MySQL Tutorial
  • Nest Install
  • Netbeans
  • Nginx
  • Nginx Troubleshooting
  • openssl
  • PCI Compliance
  • Percona
  • PHP
  • Plex Media Server Tutorial
  • Postfix
  • Proxmox Tutorial
  • Pure FTPd
  • Resourcespace Tutorial
  • Route 53
  • Rsync Tutorial
  • Security
  • Smoothwall Troubleshooting
  • Smoothwall Tutorial
  • SSH
  • tcpdump
  • Thunderbird
  • Tomcat Troubleshooting
  • Ubuntu Tutorial
  • Uncategorized
  • Unison
  • vmware
  • vzdump
  • WHM
  • Wireshark
  • Wordpress Troubleshooting
  • WordPress Tutorial

“See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." Linus Torvalds

© 2017 copyright www.linuxtutorial.co.uk // All rights reserved