V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  lslqtz  ›  全部回复第 199 页 / 共 239 页
回复总数  4776
1 ... 195  196  197  198  199  200  201  202  203  204 ... 239  
附上本人配置文件。

#user nobody;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 600;
client_max_body_size 128m;
server_names_hash_bucket_size 64;

fastcgi_connect_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_read_timeout 300s;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;

gzip on;
gzip_comp_level 9;
gzip_types text/plain text/css application/javascript;

server {
listen 80;
return 403;
}

server {
listen 80;
server_name loli.wiki www.loli.wiki loliwiki.cn www.loliwiki.cn loliwiki.cc www.loliwiki.cc loliwiki.org www.loliwiki.org;
return 301 https://www.loliwiki.org$request_uri;
}

server {
listen 443 ssl http2;
server_name www.loliwiki.org;
index index.php index.htm index.html;
root /var/www/wiki;

ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_certificate /usr/local/nginx/conf/1.crt;
ssl_certificate_key /usr/local/nginx/conf/1.key;
ssl_ct on;
ssl_ct_static_scts /usr/local/nginx/conf/sct1;

location / {
try_files $uri $uri/ /index.php?$args;
if (-f $request_filename) {
break;
}
set $supercache_file '';
set $supercache_uri $request_uri;
set $supercache 1;
set $ihttp_host '';
if ($request_method = POST) {
set $supercache 0;
}
set $qs 0;
if ($query_string) {
set $qs 1;
}
if ($query_string ~* "^utm_source=([^&]+)&utm_medium([^&]+)&utm_campaign=([^&]+)(&utm_content=([^&]+))?$") {
set $qs 0;
set $supercache_uri $document_uri;
}
#deactivate on high load
if ($qs = 1) {
set $supercache 0;
}
if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
set $supercache 0;
}
if ($http_user_agent ~* '(iphone|ipod|aspen|incognito|webmate|android|dream|cupcake|froyo|blackberry9500|blackberry9520|blackberry9530|blackberry9550|blackberry 9800|webos|s8000|bada)') {
set $ihttp_host '-mobile';
}
if ($supercache = 0) {
set $supercache_uri '';
}
if ($supercache_uri ~ ^(.+)$) {
set $supercache_file /var/www/html/wp-content/cache/supercache/$http_host$1/index${ihttp_host}.html;
}
if (-f $document_root$supercache_file) {
#rewrite ^(.*)$ $supercache_file break;
rewrite ^ $supercache_file last;
}
if (!-e $request_filename) {
rewrite . /index.php last;
}
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

location ~ /\.ht {
deny all;
}
location ~ \.(gif|jpg|png|htm|html|css|js|ico)$ {
expires 30d;
}
location ~ .*\.(php|php5)?$ {
fastcgi_pass unix:/var/run/phpfpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}

server {
listen 80;
server_name hardware.name www.hardware.name hardwareunion.com;
return 301 http://www.hardwareunion.com$request_uri;
}

server {
listen 80;
server_name www.hardwareunion.com;
index index.php index.htm index.html;
root /var/www/html;

location / {
try_files $uri $uri/ /index.php?$args;
if (-f $request_filename) {
break;
}
set $supercache_file '';
set $supercache_uri $request_uri;
set $supercache 1;
set $ihttp_host '';
if ($request_method = POST) {
set $supercache 0;
}
set $qs 0;
if ($query_string) {
set $qs 1;
}
if ($query_string ~* "^utm_source=([^&]+)&utm_medium([^&]+)&utm_campaign=([^&]+)(&utm_content=([^&]+))?$") {
set $qs 0;
set $supercache_uri $document_uri;
}
#deactivate on high load
if ($qs = 1) {
set $supercache 0;
}
if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
set $supercache 0;
}
if ($http_user_agent ~* '(iphone|ipod|aspen|incognito|webmate|android|dream|cupcake|froyo|blackberry9500|blackberry9520|blackberry9530|blackberry9550|blackberry 9800|webos|s8000|bada)') {
set $ihttp_host '-mobile';
}
if ($supercache = 0) {
set $supercache_uri '';
}
if ($supercache_uri ~ ^(.+)$) {
set $supercache_file /var/www/html/wp-content/cache/supercache/$http_host$1/index${ihttp_host}.html;
}
if (-f $document_root$supercache_file) {
#rewrite ^(.*)$ $supercache_file break;
rewrite ^ $supercache_file last;
}
if (!-e $request_filename) {
rewrite . /index.php last;
}
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

location ~ /\.ht {
deny all;
}
location ~ \.(gif|jpg|png|htm|html|css|js|ico)$ {
expires 30d;
}
location ~ .*\.(php|php5)?$ {
fastcgi_pass unix:/var/run/phpfpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}
2016-06-20 11:40:22 +08:00
回复了 BBOO 创建的主题 PHP php 如何高效率的判断远程图片是否存在
<?php
error_reporting(0);
header('content-type:application/json');
$data='vssfafsa=dgastgdagda&xfafafaf=tgfdfdsafa';
$opts=array(
'http'=>array(
'method'=>'POST',
'header'=>"Content-type:application/x-www-form-urlencoded\r\nContent-length:".strlen($data),
'content'=>$data
));
file_get_contents('http://www.baidu.com',false,stream_context_create($opts));
if ($http_response_header[0] == 'HTTP/1.1 302 Moved Temporarily') {
echo '{"code":200}';
} else {
echo '{"code":403}';
}
?>
这样?
2016-06-20 11:39:26 +08:00
回复了 BBOO 创建的主题 PHP php 如何高效率的判断远程图片是否存在
file_get_contents get_headers
2016-06-20 10:40:11 +08:00
回复了 iugo 创建的主题 程序员 民间布道: 让 Web 服务使用 HTTPS
@BearTher 啥,你和 cn.com 比好记?
国外还有 com.sb 呢。。
2016-06-20 08:26:18 +08:00
回复了 terrancesiu 创建的主题 宽带症候群 电信屏蔽了工信部投诉网站
@ArthurHunt 我之前有被屏蔽,举报后赔了几百块。
2016-06-20 08:15:03 +08:00
回复了 terrancesiu 创建的主题 宽带症候群 电信屏蔽了工信部投诉网站
我表示举报后估计运营商就惨了。
我新配电脑内存准备上 32g 。。未来还要升级 64g 。
安利 osu!, osu!大法好,以及守望屁股,打砸抢 5 , cod 之类的。
http://www.osu.pink (滑稽)
2016-06-20 08:12:23 +08:00
回复了 kuuuuku 创建的主题 互联网 BTDigg 好像挂了。。。。。。
还以为墙升级了 233
2016-06-20 08:06:11 +08:00
回复了 satura 创建的主题 Linux 请推荐适合新手使用的桌面 Linux 发行版本
@Cabana arch 大法好(可我从不用)
2016-06-20 07:18:17 +08:00
回复了 iugo 创建的主题 程序员 民间布道: 让 Web 服务使用 HTTPS
@Zohar 滋此。
@Laynooor Google 的字体库全部炸了,本人在使用科大的字体库。
2016-06-20 07:17:42 +08:00
回复了 iugo 创建的主题 程序员 民间布道: 让 Web 服务使用 HTTPS
@BearTher 只要域名好,就要买买买。
1 ... 195  196  197  198  199  200  201  202  203  204 ... 239  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2418 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 50ms · UTC 07:27 · PVG 15:27 · LAX 00:27 · JFK 03:27
Developed with CodeLauncher
♥ Do have faith in what you're doing.