rabin 1 year ago
parent
commit
5dcbe503c6

+ 19 - 0
container/conf/web/nginx/conf.d/proxy.conf

@@ -0,0 +1,19 @@
+server {
+    server_name proxy.shemic.com;
+    listen 80; # 或者 443,如果你使用 HTTPS 的话
+    #ssl on; 是否启用加密连接
+    #如果你使用 HTTPS,还需要填写 ssl_certificate 和 ssl_certificate_key
+
+    location / {
+         proxy_pass  http://backend;
+         proxy_redirect off;
+         proxy_set_header        X-Forwarded-For $remote_addr;
+         location ~* \.(html|css|jpg|gif|ico|js)$ {
+                proxy_cache          cache;
+                proxy_cache_key      $host$uri$is_args$args;
+                proxy_cache_valid    200 301 302 30m;
+                expires              30m;
+                proxy_pass  http://backend;
+         }
+    }
+}

+ 47 - 0
container/conf/web/nginx/conf.d/showka.conf

@@ -0,0 +1,47 @@
+server {
+    server_name shouka.5dev.cn;
+    listen 80;
+    
+    autoindex on;
+
+    set $charset utf-8;
+
+    charset $charset;
+
+    set $rootdir /www/shouka;
+    root $rootdir;
+    index index.php index.html;
+    if (!-d $request_filename){
+        set $rule_0 1$rule_0;
+    }
+    if (!-f $request_filename){
+        set $rule_0 2$rule_0;
+    }
+    if ($rule_0 = "21"){
+        rewrite ^/(.*)$ /index.php?s=$1 last;
+    }
+    location / {
+                # First attempt to serve request as file, then
+                # as directory, then fall back to displaying a 404.
+                try_files $uri $uri/ =404;
+                # Uncomment to enable naxsi on this location
+                # include /etc/nginx/naxsi.rules
+    }
+
+    #location ~ ^(.*)$ {
+    location ~ \.php$ {
+        fastcgi_split_path_info ^(.+\.php)(/.+)$;
+        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini (No settings!)
+
+        # With php-cgi alone:
+        #fastcgi_pass web-php7_swoole:9000;
+        fastcgi_pass web-php7:9000;
+        #fastcgi_pass web-php5:9000;
+        # With php-fpm:
+        #fastcgi_pass unix:/var/run/php7-fpm.sock;
+        fastcgi_index index.php;
+        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+        #fastcgi_param  PATH_INFO $fastcgi_path_info;
+        include fastcgi_params;
+    }
+}

+ 1 - 0
container/conf/web/php7/conf.d/00_ctype.ini

@@ -0,0 +1 @@
+extension=ctype.so

+ 1 - 0
container/conf/web/php7/conf.d/imagick.ini

@@ -0,0 +1 @@
+extension=imagick