zoukankan      html  css  js  c++  java
  • 我的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'
    
  • 相关阅读:
    c#判断输入的是不是数字
    params 关键字载入空值的陷阱
    拆箱陷阱
    接口的概念和声明
    数据库
    ios 纵向的UISlider
    微信小程序学习网站
    Spark RDD(2)
    SparkSql
    廖雪峰老师学习网站
  • 原文地址:https://www.cnblogs.com/weaming/p/5223419.html
Copyright © 2011-2022 走看看