我的wordpress在Nginx的配置

lnmp生成过程

You select the exist rewrite rule:/usr/local/nginx/conf/wordpress.conf Gracefully shutting down php-fpm . done Starting php-fpm done Test Nginx configure file...... nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful Restart Nginx...... nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid" ================================================ Virtualhost infomation: Your domain: blog.ruanjiadeng.com Home Directory: /www/wordpress Rewrite: wordpress Enable log: yes Create database: no Create ftp account: no ================================================ 

复制于lnmp自动生成的规则。

server { listen 80; #listen [::]:80; server_name blog.ruanjiadeng.com; index index.html index.htm index.php default.html default.htm default.php; root /www/wordpress; location / { try_files $uri $uri/ /index.php?$args; } # Add trailing slash to */wp-admin requests. rewrite /wp-admin$ $scheme://$host$uri/ permanent; #error_page 404 /404.html; location ~ [^/]\.php(/|$) { # comment try_files $uri =404; to enable pathinfo try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; #include pathinfo.conf; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } #access_log /home/wwwlogs/blog.ruanjiadeng.com.log access; } 

偏爱主题:https://wordpress.org/themes/inove/

pgsql数据库操作

pg_dump dbname > outfile sudo pg_dump -U postgres -h localhost dbname > outfile sudo -u postgres psql alter user postgres with password 'foobar'