srapberry

You should look at the following URL's in order to grasp a solid understanding

of Nginx configuration files in order to fully unleash the power of Nginx.

http://wiki.nginx.org/Pitfalls

http://wiki.nginx.org/QuickStart

http://wiki.nginx.org/Configuration

#

Generally, you will want to move this file somewhere, and start with a clean

file but keep this around for reference. Or just disable in sites-enabled.

#

Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.

##

Default server configuration

# server { listen 80 default_server; listen [::]:80 default_server;

SSL configuration

#

listen 443 ssl default_server;

listen [::]:443 ssl default_server;

#

Self signed certs generated by the ssl-cert package

Don't use them in a production server!

#

include snippets/snakeoil.conf;

root /var/www/html;

Add index.php to the list if you are using PHP

index index.html index.htm index.nginx-debian.html;

servername ;

location / {

First attempt to serve request as file, then

as directory, then fall back to displaying a 404.

try_files $uri $uri/ =404; }

pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

# #location ~ .php$ {

include snippets/fastcgi-php.conf;

#

# With php5-cgi alone:

fastcgi_pass 127.0.0.1:9000;

# With php5-fpm:

fastcgi_pass unix:/var/run/php5-fpm.sock;

#}

deny access to .htaccess files, if Apache's document root

concurs with nginx's one

# #location ~ /.ht {

deny all;

#} }

Virtual Host configuration for example.com

#

You can move that to a different file under sites-available/ and symlink that

to sites-enabled/ to enable it.

# #server {

listen 80;

listen [::]:80;

#

server_name example.com;

#

root /var/www/example.com;

index index.html;

#

location / {

try_files $uri $uri/ =404;

}

#}

相关推荐

大模型打擂——文章解析篇

大模型打擂——文章解析篇

刷到一篇鸡汤文,“怎么判断一个男生本身就是很好的人?”然后想让大模型来分析下论点的正确性。看看哪个大模型胜出。https://mp.weixin.qq.com/s/-xvJekq7AbFpebcoN8shQ 1号选手:元宝·hunyuan T1 深度思考 从多个心理学角度来看,这篇文章中的观点具有一定的合理性,以下为你详细分析: 1. 真正“不错”的男生看似“无聊” - 人格...
阅读全文 →
《未来世界的幸存者》

《未来世界的幸存者》

阮一峰的博客,搞IT的大多数应该都知道,或像我一样常看常新。以前多看的是技术性文章,学习一些技术能力。看完阮侠写的文集《未来世界的幸存者》,已经集文成书。加上最近在看的凯文凯利的《2049》。一个比较悲观,一个比较乐观的对未来进行的他们视角上的理解。对两方预测不做评价,毕竟未来未来,当下还看不到准确的运行轨迹。 阮侠,以前持有技术让生活美好好的理想。从2002年开始一路研究各种新技术,并秉持...
阅读全文 →
远离一切让你感觉到不舒服的人

远离一切让你感觉到不舒服的人

!https://i.junwei.bid:89/i/2025/09/08/h2krz1.webp 血月晚,和朋友喝酒。 聊到孩子、养老,最后被我拉到人工智能+的话题,看看朋友们对这个的认识程度,结果很失望。他们都搞不明白未来会是什么样,还以老了,跟不上了为意识。而且还引到互联网+时代中,我所进行的尝试,必定失败的言论。脸红脖子粗的状态。以前我听这话会生气,会躯体化反应的反击。现在我没有“...
阅读全文 →