ini 来自https://wiki.deimos.fr/Nginx_::Installation_et_configuration_d'une_alternative_d'Apach

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini 来自https://wiki.deimos.fr/Nginx_::Installation_et_configuration_d'une_alternative_d'Apach相关的知识,希望对你有一定的参考价值。

server {
    include listen_port.conf;
    listen 443 ssl;
 
    ssl_certificate /etc/nginx/ssl/deimos.fr/server-unified.crt;
    ssl_certificate_key /etc/nginx/ssl/deimos.fr/server.key;
    ssl_session_timeout 5m;
 
    server_name wiki.deimos.fr wiki.m.deimos.fr;
    root /usr/share/nginx/www/deimos.fr/blocnotesinfo;
 
    client_max_body_size 5m;
    client_body_timeout 60;
 
    access_log /var/log/nginx/wiki.deimos.fr_access.log;
    error_log /var/log/nginx/wiki.deimos.fr_error.log;
 
    location / {
        rewrite ^/$ $scheme://$host/index.php permanent;
        # Short URL redirect
        try_files $uri $uri/ @rewrite;
    }
 
    location @rewrite {
        if (!-f $request_filename){
            rewrite ^/(.*)$ /index.php?title=$1&$args;
        }
    }
 
    # Force SSL Login
    set $ssl_requested 0;
    if ($arg_title ~ Sp%C3%A9cial:Connexion) {
        set $ssl_requested 1;
    }
    if ($scheme = https) {
        set $ssl_requested 0;
    }
    if ($ssl_requested = 1) {
        return 301 https://$host$request_uri;
    }
 
    # Drop config
    include drop.conf;
 
    # Deny direct access to specific folders
    location ^~ /(maintenance|images)/ {
        return 403;
    }
 
    location ~ \.php$ {
        fastcgi_cache mycache;
        fastcgi_cache_key $request_method$host$request_uri;
        fastcgi_cache_valid any 1h;
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
    }
 
    location = /_.gif {
        expires max;
        empty_gif;
    }
 
    location ^~ /cache/ {
        deny all;
    }
 
    location /dumps {
        root /usr/share/nginx/www/deimos.fr/blocnotesinfo/local;
        autoindex on;
    }
 
    # BEGIN W3TC Browser Cache
    gzip on;
    gzip_types text/css application/x-javascript text/x-component text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
    location ~ \.(css|js|htc)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.4";
    }
 
    location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {
        expires 3600s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.4";
    }
 
    location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        add_header X-Powered-By "W3 Total Cache/0.9.2.4";
        try_files $uri $uri/ @rewrite;
    }
    # END W3TC Browser Cache
}

以上是关于ini 来自https://wiki.deimos.fr/Nginx_::Installation_et_configuration_d'une_alternative_d'Apach的主要内容,如果未能解决你的问题,请参考以下文章

ini 来自https://stackoverflow.com/questions/23704674/phpmyadmin-allow-remote-users

xampp sendmail 使用 gmail 帐户,来自 ubuntu

ini 来自http://media.pragprog.com/titles/bhtmux/code/config/tmux.conf的tmux.conf的Pragprog版本

ini Raspberry Pi - ntp服务器配置。来自:https://frillip.com/raspberry-pi-stratum-1-ntp-server/

c_cpp 来自http://www.qtcentre.org/threads/21473-How-to-use-QSettings-to-read-INI-file

python使用configparser读取ini格式的配置文件