nginx.pid 不见了,nginx启动失败 1C

公司搬家,机器没有关好。

后来启动机器上的nginx(openresty中集成的nginx),但是启动会卡住,如果nginx -s reload,机会如下图
图片说明

网上的解决办法是nginx -c ....../nginx/conf/nginx.conf,但是还是会卡住不动,希望大佬神指点。

第一次提问,以前没有C币的意识,仅有1个铜板,见谅见谅

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
nginx无法重启 “/var/run/nginx/nginx.pid”failed
我第一次启动是可以成功访问的,之后我重启了电脑,再次启动的时候报错了 ![图片说明](https://img-ask.csdn.net/upload/201701/09/1483947199_123063.png) 我看网上说要用-c参数,我也试了,还是不行 ![图片说明](https://img-ask.csdn.net/upload/201701/09/1483947276_874597.png) 还有一个疑问是,我看别人的目录结构里都有logs这个文件,但我的找不到logs这个目录,只有conf,html ,sbin 三个文件夹 有没有知道怎么解决的帮下小弟,万分感谢。
nginx启动报错 Failed to start A high performance web server and a reverse proxy server.
``` root@tedu:/etc/nginx/sites-enabled# vim default ``` 修改了default文件 ``` location/static{ root /home/tarena/Download/ajax_day01_all/ajax_day01_all/mysite8; } ``` 增加了静态地址 分号没有漏掉 ``` sudo /etc/init.d/nginx restart ``` 运行报错 nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since 三 2019-10-30 14:36:12 CST; 13min ago Process: 13022 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exite Process: 12334 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 13098 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) Main PID: 12338 (code=exited, status=0/SUCCESS) 10月 30 14:36:12 tedu systemd[1]: Starting A high performance web server and a reverse proxy server... 10月 30 14:36:12 tedu nginx[13098]: nginx: [emerg] unknown directive "location/static" in /etc/nginx/sites-enabled/de 10月 30 14:36:12 tedu nginx[13098]: nginx: configuration file /etc/nginx/nginx.conf test failed 10月 30 14:36:12 tedu systemd[1]: nginx.service: Control process exited, code=exited status=1 10月 30 14:36:12 tedu systemd[1]: Failed to start A high performance web server and a reverse proxy server. 10月 30 14:36:12 tedu systemd[1]: nginx.service: Unit entered failed state. 10月 30 14:36:12 tedu systemd[1]: nginx.service: Failed with result 'exit-code'. ~ ~
nginx启动闪退,端口已经改成了88
日志: 2018/12/02 17:08:40 [error] 18452#19916: CreateFile() "D:\nginx-1.12.2/logs/nginx.pid" failed (2: The system cannot find the file specified)
nginx启动 重启 停止 报错 求大神解决
一启动就报错: [root@localhost sbin]# ./nginx [root@localhost sbin]# nginx: [emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory) 按照网上说的添加/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf还是报上面的错
centos7下安装nginx出错,求助大神
``` objs/ngx_modules.o \ -ldl -lpthread -lcrypt -lpcre -lcrypto -lcrypto -lz \ -Wl,-E sed -e "s|%%PREFIX%%|/usr/local/nginx|" \ -e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \ -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \ -e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \ < man/nginx.8 > objs/nginx.8 make[1]: Leaving directory `/root/nginx-1.10.3' ```
Linux下nginx配置问题;
nginx -t 然后下面出现这个问题: nginx: [emerg] a duplicate listen 0.0.0.0:443 in /etc/nginx/nginx.conf:43 nginx: configuration file /etc/nginx/nginx.conf test failed 这是我的nginx.conf文件; # For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/ user root; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; server { listen 443 default_server; listen [::]:443 default_server; server_name 192.168.80.30; root /usr/pajc/PAJC/Source/public; listen 443 ssl; ssl_certificate /etc/ssl/server.pem; ssl_certificate_key /etc/ssl/privkey.pem; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } # Settings for a TLS enabled server. # # server { # listen 443 ssl http2 default_server; # listen [::]:443 ssl http2 default_server; 顺便问下有没有大佬能教下Linux搭建laravel项目教程。详细点的
nginx+php部署关于nginx.conf配置问题,请教熟悉的朋友
我使用的lnmp包安装的,安装提示成功。也能正常访问phpinfo页面。 把自己项目放上去后,更改了php.ini的doc_root 改为项目地址;然后就是nginx改成以下: user root; worker_processes auto; error_log /home/wwwlogs/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 51200; events { use epoll; worker_connections 51200; multi_accept on; } http { include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 50m; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 256k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable "MSIE [1-6]\."; #limit_conn_zone $binary_remote_addr zone=perip:10m; ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section. server_tokens off; #log format log_format access '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for'; access_log off; upstream OfficeFPM { server 127.0.0.1:8266 weight=1; keepalive 100; } server { listen 81 default_server; server_name localhost; index index.html index.php; root /home/wwwroot/default; #error_page 404 /404.html; include enable-php.conf; if (-d $request_filename){rewrite ^/(.*)([^/])$ $scheme://$http_host/$1$2/ permanent; } #charset gbk; #access_log logs/host.access.log main; location ~* ^/(attachment|static|images|theme|templates|wav)/.*\.(php|.php3|.php5|jsp|asp)$ { deny all; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:8266 # location ~ \.php$ { fastcgi_pass OfficeFPM; fastcgi_index index.php; include fastcgi.conf; } location /general/document/index.php/ { fastcgi_pass OfficeFPM; fastcgi_index index.php; include fastcgi.conf; fastcgi_param SCRIPT_FILENAME /home/wwwroot/default/general/document/index.php; fastcgi_param SCRIPT_NAME /general/document/index.php; fastcgi_split_path_info ^(.+\.php)/(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; } location /general/itask/router.php/ { fastcgi_pass OfficeFPM; fastcgi_index index.php; include fastcgi.conf; fastcgi_param SCRIPT_FILENAME /home/wwwroot/default/general/itask/router.php; fastcgi_param SCRIPT_NAME /general/itask/router.php; } location ~* ^/attachment/(background|im|new_sms|reportshop|cache|data_center) { allow all; } location ~* ^/attachment { deny all; } location ~ /\. { deny all; } location / { if (!-e $request_filename){ rewrite ^/(.*) /index.php last; } } access_log /home/wwwlogs/access.log access; } include vhost/*.conf; } 当时访问出现如下图错误,index.php报错 ![图片说明](https://img-ask.csdn.net/upload/201603/06/1457263996_477379.png) 当我改成静态页面时候却能正常访问,请教了,本人第一次搞这个对这些配置文件很模糊,请高手帮忙改下。
已安装的Nginx追加自带模块始终报错
* Centos7系统下已安装的nginx需要追加http_limit_req_module模块。按照网上的方法,下载了对应版本的源码, 1. 在配置参数后追加--with-http_limit_req_module,出现以下报错 ``` ./configure: error: invalid option "--with-http_limit_req_module" ``` 2. 使用--add-module=http_limit_req_module报找不到config文件 ``` adding module in http_limit_req_module ./configure: error: no http_limit_req_module/config was found ``` 3. 将模块名改成ngx_http_limit_req_module报的也是类似的错误 # 求大神看看应该怎么添加 下面是完整配置参数,nginx版本是1.17.8,--with-http_limit_req_module前的参数是用nginx -V查出来的 ``` ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --with-http_limit_req_module ```
<已解决>nginx配置问题 急急急
大家好 最近买了个域名,租了一台服务器(centos,yum安装 )但再nginx的配置上出了问题 这是我的/etc/nginx/nginx.conf ``` user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } } ``` 我把虚拟主机的配置放在了/etc/nginx/conf.d/目录下了 文件名:liangzda.com.conf 配置如下: ``` server { listen 80; server_name www.liangzda.com; location /{ proxy_pass http://localhost:8080; } } ``` 我安装了tomcat,监听8080端口 打算把访问www.liangzda.com的请求转发给tomcat 一顿配置之后,重启nginx时,提示出错,查看日志文件如下: [emerg] "server" directive is not allowed here in /etc/nginx/conf.d/liangzda.com.conf:1 请问应该怎么办? 最后自己发现是自己在conf.d 和 default.conf里面重复放了配置文件 所以出错,我把两个配置文件都删除了,然后自己建了一个文件夹 vhost 然后把配置文件添加到里面 ,再在nginx.conf里面添加include vhost/*.conf 就好了
liunx安装nginx出现问的题,求解。问题如图
![图片说明](https://img-ask.csdn.net/upload/201810/26/1540543569_105980.png) 在liunx的centos7系统上编译nginx阶段出现如上的错误,OpenSSL的版本是openssl-1.1.1 编译的参数如下 ./configure --sbin-path=/usr/local/nginx/nginx \ --conf-path=/usr/local/nginx/nginx.conf \ --pid-path=/usr/local/nginx/nginx.pid \ --with-http_ssl_module \ --with-pcre=/usr/local/src/pcre-8.42 \ --with-zlib=/usr/local/src/zlib-1.2.11 \ --with-openssl=/usr/local/src/openssl-1.1.1 make make install
阿里云+nginx+ssl+https配置后,网页依旧无法显示,请大神指教
阿里云+nginx+ssl配置后,网页依旧无法显示,请大神指教 域名已经解析 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225059_616698.png) 服务器相关端口已打开 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581231238_906425.png) 系统是unbuntu16,nginx版本为1.15,已有ssl模块 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225248_962076.png) ssl证书有上传至服务器 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225321_579997.png) nginx的配置文件nginx.conf内容如下 ``` #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; # server { # listen 80; # server_name localhost; # #charset koi8-r; # #access_log logs/host.access.log main; # location / { # root html; # index index.html index.htm; # } # #error_page 404 /404.html; # # redirect server error pages to the static page /50x.html # # # error_page 500 502 503 504 /50x.html; # location = /50x.html { # root html; # } # # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # # # #location ~ \.php$ { # # proxy_pass http://127.0.0.1; # #} # # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # # # #location ~ \.php$ { # # root html; # # fastcgi_pass 127.0.0.1:9000; # # fastcgi_index index.php; # # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # # include fastcgi_params; # #} # # deny access to .htaccess files, if Apache's document root # # concurs with nginx's one # # # #location ~ /\.ht { # # deny all; # #} # } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # server { listen 443 ssl; server_name www.faceanalyze.club faceanalyze.club; ssl_certificate /usr/local/nginx/cert/cert.pem; ssl_certificate_key /usr/local/nginx/cert/cert.key; # ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } } server { listen 80; server_name www.faceanalyze.club faceanalyze.club; return 301 https://$server_name$request_uri; } } ``` nginx有重新加载配置,端口使用情况如下 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225719_742816.png) 用浏览器查看时,无法显示 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225832_412617.png) 请大神求解!谢谢
安装nginx,添加它为系统服务,nano /etc/init.d/nginx添加的配置代码看不懂
#!/bin/sh # # nginx - this script starts and stops the nginx daemon # # chkconfig: - 85 15 # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ # proxy and IMAP/POP3 proxy server # processname: nginx # config: /data/nginx/nginx.conf # config: /etc/sysconfig/nginx # pidfile: /var/run/nginx.pid # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ "$NETWORKING" = "no" ] && exit 0 nginx="/data/nginx/sbin/nginx" prog=$(basename $nginx) NGINX_CONF_FILE="/data/nginx/conf/nginx.conf" [ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx lockfile=/var/lock/subsys/nginx start() { [ -x $nginx ] || exit 5 [ -f $NGINX_CONF_FILE ] || exit 6 echo -n $"Starting $prog: " daemon $nginx -c $NGINX_CONF_FILE retval=$? echo [ $retval -eq 0 ] && touch $lockfile return $retval } stop() { echo -n $"Stopping $prog: " killproc $prog -QUIT retval=$? echo [ $retval -eq 0 ] && rm -f $lockfile return $retval killall -9 nginx } restart() { configtest || return $? stop sleep 1 start } reload() { configtest || return $? echo -n $"Reloading $prog: " killproc $nginx -HUP RETVAL=$? echo } force_reload() { restart } configtest() { $nginx -t -c $NGINX_CONF_FILE } rh_status() { status $prog } rh_status_q() { rh_status >/dev/null 2>&1 } case "$1" in start) rh_status_q && exit 0 $1 ;; stop) rh_status_q || exit 0 $1 ;; restart|configtest) $1 ;; reload) rh_status_q || exit 7 $1 ;; force-reload) force_reload ;; status) rh_status ;; condrestart|try-restart) rh_status_q || exit 0 ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}" exit 2 esac 请有空的大神指导下几个主要步骤的作用(详细的当然更好),先谢过啦!本人是纯新手,只知道一点简单命令,对着文档知其然而不知其所以然,真心很苦恼。。。。。。
如何将java Web项目设置 nginx反向代理
操作系统 : cent Os 7 虚拟机上用tomcat跑了一个web项目,端口8001 虚拟机IP:192.168.168.144 在主机上可以通过 192.168.168.144:8001/web访问该项目。 请教如何配置nginx , 可以实现在 主机上 通过 www.mywebtest.com访问到该web项目? 呃,自己搞了半天。nginx都启不起来。。 配置文件如下: user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; server{ listen 192.168.168.144:8001; server_name www.mywebtest.com; location / { root web; } } }
为何django admin 静态文件一直加载不上去
user root; worker_processes auto; #pid /run/nginx.pid; events { worker_connections 768; } http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; #access_log/var/log/nginx/access.log; #error_log/var/log/nginx/error.log; gzip on; gzip_disable "msie6"; server { listen 80; server_name 47.103.45.202; charset utf-8; location / { uwsgi_pass 127.0.0.1:8000; include /usr/local/nginx/conf/uwsgi_params; uwsgi_param UWSGI_CHDIR /data/mywork/mywork; uwsgi_param UWSGI_SCRIPT mywork.wsgi; } location /static/ { alias /data/mywork/static/; } } } ``` [uwsgi] chdir = /data/mywork #ip =0.0.0.0 #port=8000 module= mywork.wsgi:application #home= /data/env/pyweb #workers=%k processes = 4 threads=2 #http=%(d):%(port) wsgi-file = mywork/wsgi.py socket=127.0.0.1:8000 master = true pidfile=uwsgi.pid enabled-threads=true vacuum = true daemonize = /data/mywork/mywork/run.log disable-logging = true #virtualenv = /data/evn/pyweb/lib/python3.6/ static-map=/static=/data/mywork/static ``` ``` ```按照网上的方法修改setting.by, 然后先收集静态文件 修改nginx静态文件配置路径,重启nginx 重启uwsgi 还是不行,不知道原因出在哪里 求高人指点
Nginx + Tomcat 反向代理,配置失败,求大神解惑!
前提: 二级域名:www.hnrunzhi.com,admin.hnrunzhi.com http service:Nginx web service:Tomcat 服务器:Linux 目的:通过Nginx反向代理实现 多个二级域名访问 linux服务器上tomcat上的web项目。 例如:www.hnrunzhi.com 通过Nginx反向代理访问 a项目 www.hnrunzhi.com 通过Nginx反向代理访问 b项目 Nginx的nginx.conf文件如下: ``` #设置低权限用户,为了安全而设置的 #user nobody; #工作衍生进程数 worker_processes 4; #设置错误文件存放路径 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #设置pid存放路径(pid是控制系统中重要文件) #pid logs/nginx.pid; #设置最大连接数 events{ worker_connections 1024; } http { #用来设置日志格式 log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; #用来指定日志文件的存放路径 #access_log /data/wwwlogs/access_nginx.log main; #开启高效文件传输模式 sendfile on; #防止网络阻塞 tcp_nopush on; #防止网络阻塞 tcp_nodelay on; #长连接超时时间,单位是秒 keepalive_timeout 65; #散列表的冲突率,默认1024,越大则内存消耗更多,但散列key的冲突率会降低,检索速度就更快 types_hash_max_size 2048; #文件扩展名与文件类型映射表 include /usr/local/nginx/conf/mime.types; #默认文件类型 default_type application/octet-stream; #include /etc/nginx/conf.d/*.conf; #主要是用于设置一组可以在proxy_pass和fastcgi_pass指令中使用额代理服务器,默认负载均衡方式为轮询 upstream tomcat_client { server localhost:8080; } #开启gzip压缩,开启后,访问网页会自动压缩 #gzip on; #指定服务器的名称和参数 server { listen 80; server_name www.hnrunzhi.com; location / { proxy_pass http://tomcat_client; proxy_redirect default; #设置代理 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } server { listen 80; server_name admin.hnrunzhi.com; location / { proxy_pass http://tomcat_client; proxy_redirect default; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } } ``` Tomcat的service.xml文件如下: ``` <Service name="Catalina"> <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="utf-8"/> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> <Engine name="Catalina" defaultHost="www.hnrunzhi.com"> <Realm className="org.apache.catalina.realm.LockOutRealm"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> <Host name="www.hnrunzhi.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="/" docBase="/usr/java/apache-tomcat-7.0.79/webapps/Education" reloadable="true"/> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="www_access_log." suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" /> </Host> <Host name="admin.hnrunzhi.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="/" docBase="/usr/java/apache-tomcat-7.0.79/webapps/RunZhi.M.S" reloadable="true"/> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="admin_access_log." suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" /> </Host> </Engine> </Service> ``` 结果: 通过http://www.hnrunzhi.com/ 可以正常访问到Education项目,而http://admin.hnrunzhi.com 报404,需要 http://admin.hnrunzhi.com/RunZhi.M.S/ 这样才能访问 请大牛帮帮忙,瞧瞧看,我哪个地方配置的是不是有问题咯? 谢谢!~~~
nginx1.8+tomcat8配置不成功
按照以下文件配置之后,单独访问localhost:8080没有问题,但是访问localhost就还是nginx的欢迎页面,没有转到tomcat页面 nginx.conf文件; ``` #user root; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 2048; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; upstream tomcats{ server 127.0.0.1:8080; } server { listen 80; server_name tomcats; #charset koi8-r; access_log logs/host.access.log main; location / { proxy_pass http://tomcats; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} #if (-d $request_filename) #{ # rewrite ^/(.*)([^/])$http://$host/$1$2/ permanent; #} location ~ \.(jsp|jspx|do|action|wsdl)?$ { # proxy_set_header Host $host; # proxy_set_header X-Forwarded-For $remote_addr; proxy_connect_timeout 3; proxy_send_timeout 30; proxy_read_timeout 30; proxy_pass http://tomcat_server; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} } ``` server.xml文件: ``` <?xml version='1.0' encoding='utf-8'?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Note: A "Server" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/server.html --> <Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <!-- Security listener. Documentation at /docs/config/listeners.html <Listener className="org.apache.catalina.security.SecurityListener" /> --> <!--APR library loader. Documentation at /docs/apr.html --> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <!-- Prevent memory leaks due to use of particular java/javax APIs--> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --> <GlobalNamingResources> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" Note: A "Service" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/service.html --> <Service name="Catalina"> <!--The connectors can use a shared executor, you can define one or more named thread pools--> <!-- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> --> <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL/TLS HTTP/1.1 Connector on port 8080 --> <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <!-- A "Connector" using the shared thread pool--> <!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> --> <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 This connector uses the NIO implementation that requires the JSSE style configuration. When using the APR/native implementation, the OpenSSL style configuration is required as described in the APR/native documentation --> <!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" /> --> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> <!-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html --> <!-- You should set jvmRoute to support load-balancing via AJP ie : <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"> --> <Engine name="Catalina" defaultHost="localhost"> <!--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) --> <!-- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> --> <!-- Use the LockOutRealm to prevent attempts to guess user passwords via a brute-force attack --> <Realm className="org.apache.catalina.realm.LockOutRealm"> <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase". Any edits that are performed against this UserDatabase are immediately available for use by the Realm. --> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <!-- Access log processes all example. Documentation at: /docs/config/valve.html Note: The pattern used is equivalent to using pattern="common" --> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" /> </Host> </Engine> </Service> </Server> ```
nginx 下载APK 直接展示到网页还是乱码
nginx mime 我配置了 application/vnd.android.package-archive apk; application/iphone pxl ipa; nginx.config: #user nobody; worker_processes 8; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; #default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name ip; location / { proxy_pass http://localhost:8081; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } server { listen 80; server_name ip; location / { proxy_pass http://localhost:9081; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } } 求大神告诉怎么配置才能访问url 直接下载APK
nginx 跨域 swagger 访问api 请求 options 405
![图片说明](https://img-ask.csdn.net/upload/201812/21/1545383287_910353.png) 相关配置文件如下 ``` user www www; worker_processes auto; error_log /data/wwwlogs/error_nginx.log crit; pid /var/run/nginx.pid; worker_rlimit_nofile 51200; events { use epoll; worker_connections 51200; multi_accept on; } http { include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 1024m; client_body_buffer_size 10m; sendfile on; tcp_nopush on; keepalive_timeout 120; server_tokens off; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; fastcgi_intercept_errors on; #Gzip Compression gzip on; gzip_buffers 16 8k; gzip_comp_level 6; gzip_http_version 1.1; gzip_min_length 256; gzip_proxied any; gzip_vary on; gzip_types text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml text/javascript application/javascript application/x-javascript text/x-json application/json application/x-web-app-manifest+json text/css text/plain text/x-component font/opentype application/x-font-ttf application/vnd.ms-fontobject image/x-icon; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; ##If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency. #open_file_cache max=1000 inactive=20s; #open_file_cache_valid 30s; #open_file_cache_min_uses 2; #open_file_cache_errors on; #######################appapi######################### upstream api{ server 119.3.201.144:8080; server 119.3.206.88:8080; } server { listen 7070; access_log /data/wwwlogs/access_nginx.log combined; error_log /data/wwwlogs/error_nginx.log; server_name localhost; location / { proxy_pass http://api/appapi/; include proxy.conf; } } #######################coap######################### server { listen 9090; access_log /data/wwwlogs/access_nginx.log combined; error_log /data/wwwlogs/error_nginx.log; server_name localhost; location / { proxy_pass http://api/coap/; include proxy.conf; } } ########################## vhost ############################# #include vhost/*.conf; } proxy.conf proxy_connect_timeout 300s; proxy_send_timeout 900; proxy_read_timeout 900; proxy_buffer_size 32k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_redirect off; proxy_hide_header Vary; proxy_set_header Accept-Encoding ''; proxy_set_header Referer $http_referer; proxy_set_header Cookie $http_cookie; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; ~ ```
自己搭了一个Nginx, 请教一下这些错误日志如何调整config
日志内容 ``` 2017/07/14 16:28:35 [warn] 7273#7273: *4601592 upstream server temporarily disabled while reading response header from upstream, client: xx.xxx.224.40, server: xx.xxx.224.102, request: "POST /SCM.KPI.WCFHost/KpiService.svc HTTP/1.1", upstream: "http://xx.xxx.224.82:9999/SCM.KPI.WCFHost/KpiService.svc", host: "xx.xxx.224.102:9999" 2017/07/14 17:01:49 [warn] 7271#7271: *6623723 upstream server temporarily disabled while connecting to upstream, client: xx.xxx.224.35, server: xx.xxx.224.102, request: "POST /SCM.KPI.WCFHost/KpiService.svc HTTP/1.1", upstream: "http://xx.xxx.224.49:9999/SCM.KPI.WCFHost/KpiService.svc", host: "xx.xxx.224.102:9999" 2017/07/14 16:26:54 [warn] 7270#7270: *4485885 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/1/95/0000000951 while reading upstream, client: xx.xxx.224.10, server: xx.xxx.224.102, request: "POST /SCM.TMS7.WCFHost/StepTenantShipmentService.svc HTTP/1.1", upstream: "http://xx.xxx.224.50:9999/SCM.TMS7.WCFHost/StepTenantShipmentService.svc", host: "xx.xxx.224.102:9999" 2017/07/14 16:28:35 [error] 7273#7273: *4601592 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xx.xxx.224.40, server: xx.xxx.224.102, request: "POST /SCM.KPI.WCFHost/KpiService.svc HTTP/1.1", upstream: "http://xx.xxx.224.82:9999/SCM.KPI.WCFHost/KpiService.svc", host: "xx.xxx.224.102:9999" 2017/07/14 16:29:34 [error] 7270#7270: *4485752 connect() failed (110: Connection timed out) while connecting to upstream, client: xx.xxx.224.41, server: xx.xxx.224.102, request: "POST /SCM.KPI.WCFHost/KpiService.svc HTTP/1.1", upstream: "http://xx.xxx.224.49:9999/SCM.KPI.WCFHost/KpiService.svc", host: "xx.xxx.224.102:9999" ``` Config配置 ``` user nginx; worker_processes 4; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; worker_rlimit_nofile 65535; events { worker_connections 51200; } http { include /etc/nginx/mime.types; default_type application/octet-stream; tcp_nodelay on; upstream xx.xxx.224.102 { server xx.xxx.224.80:9999 weight=70; server xx.xxx.224.81:9999 weight=70; server xx.xxx.224.82:9999 weight=70; server xx.xxx.224.79:9999 weight=70; server xx.xxx.224.47:9999 weight=100; server xx.xxx.224.48:9999 weight=100; server xx.xxx.224.49:9999 weight=100; server xx.xxx.224.50:9999 weight=100; } server { listen 9999; server_name xx.xxx.224.102; location / { proxy_pass http://xx.xxx.224.102; proxy_set_header host $host; proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_connect_timeout 600s; proxy_read_timeout 600s; proxy_send_timeout 600s; proxy_next_upstream error; proxy_buffer_size 256k; proxy_buffers 128 128k; proxy_busy_buffers_size 512k; } } client_max_body_size 100m; client_body_buffer_size 100m; include /etc/nginx/conf.d/*.conf; } ```
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Elastic:菜鸟上手指南
您们好,我是Elastic的刘晓国。如果大家想开始学习Elastic的话,那么这里将是你理想的学习园地。在我的博客几乎涵盖了你想学习的许多方面。在这里,我来讲述一下作为一个菜鸟该如何阅读我的这些博客文章。 我们可以按照如下的步骤来学习: 1) Elasticsearch简介:对Elasticsearch做了一个简单的介绍 2) Elasticsearch中的一些重要概念:cluster, n
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
Java知识体系最强总结(2020版)
更新于2020-01-05 18:08:00 本人从事Java开发已多年,平时有记录问题解决方案和总结知识点的习惯,整理了一些有关Java的知识体系,这不是最终版,会不定期的更新。也算是记录自己在从事编程工作的成长足迹,通过博客可以促进博主与阅读者的共同进步,结交更多志同道合的朋友。特此分享给大家,本人见识有限,写的博客难免有错误或者疏忽的地方,还望各位大佬指点,在此表示感激不尽。 整理的Ja
计算机专业的书普遍都这么贵,你们都是怎么获取资源的?
介绍几个可以下载编程电子书籍的网站。 1.Github Github上编程书资源很多,你可以根据类型和语言去搜索。推荐几个热门的: free-programming-books-zh_CN:58K 星的GitHub,编程语言、WEB、函数、大数据、操作系统、在线课程、数据库相关书籍应有尽有,共有几百本。 Go语言高级编程:涵盖CGO,Go汇编语言,RPC实现,Protobuf插件实现,Web框架实
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我
复习一周,京东+百度一面,不小心都拿了Offer
你知道的越多,你不知道的越多 点赞再看,养成习惯 本文 GitHub https://github.com/JavaFamily 已收录,有一线大厂面试点思维导图,也整理了很多我的文档,欢迎Star和完善,大家面试可以参照考点复习,希望我们一起有点东西。 前言 还记得我上周说的重庆邮电研二的读者么? 、 知道他拿了Offer之后我也很开心,我就想把它的面试经历和面试题分享出来
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
你知道的越多,你不知道的越多 点赞再看,养成习惯 本文 GitHub https://github.com/JavaFamily 已收录,有一线大厂面试点思维导图,也整理了很多我的文档,欢迎Star和完善,大家面试可以参照考点复习,希望我们一起有点东西。 前言 很多次小伙伴问到学习方法,我也很想写这样的一篇文章来跟大家讨论下关于学习方法这件事情。 其实学习方法这个事情,我没啥发言权
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了......,这可都是提升你幸福感的高效率生产力工具哦! 走起!...... NO、1 ScreenToGif 屏幕,摄像头和
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦......,嗯,我们导员是所有导员中最帅的一个,真的...... 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强......,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧?
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每
史上最全的IDEA快捷键总结
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 相关文章: Idea 中最常用的10款插件,提高开发效率 Eclipse 最牛逼的 10 组快捷键,提高开发效率
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
你知道的越多,你不知道的越多 点赞再看,养成习惯 本文 GitHub https://github.com/JavaFamily 已收录,有一线大厂面试点思维导图,也整理了很多我的文档,欢迎Star和完善,大家面试可以参照考点复习,希望我们一起有点东西。 前前言 为啥今天有个前前言呢? 因为你们的丙丙啊,昨天有牌面了哟,直接被微信官方推荐,知乎推荐,也就仅仅是还行吧(心里乐开花)
一文带你看清 HTTP 所有概念
上一篇文章我们大致讲解了一下 HTTP 的基本特征和使用,大家反响很不错,那么本篇文章我们就来深究一下 HTTP 的特性。我们接着上篇文章没有说完的 HTTP 标头继续来介绍(此篇文章会介绍所有标头的概念,但没有深入底层) HTTP 标头 先来回顾一下 HTTP1.1 标头都有哪几种 HTTP 1.1 的标头主要分为四种,通用标头、实体标头、请求标头、响应标头,现在我们来对这几种标头进行介绍 通用
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东
【综合篇】浏览器的工作原理:浏览器幕后揭秘
web(给达达前端加星标,提升前端技能) 了解浏览器是如何工作的,能够让你站在更高的角度去理解前端 浏览器的发展历程的三大路线,第一是应用程序web化,第二是web应用移动化,第三是web操作系统化。是不是有点不直白。 应用程序web化就是随着现在技术的发展,现在越来越多的应用转向了浏览器与服务器,就是B/S架构;web应用移动化,就是在移动设备应用,什么是移动设备呢。 “移动设备:
破14亿,Python分析我国存在哪些人口危机!
2020年1月17日,国家统计局发布了2019年国民经济报告,报告中指出我国人口突破14亿。 猪哥的朋友圈被14亿人口刷屏,但是很多人并没有看到我国复杂的人口问题:老龄化、男女比例失衡、生育率下降、人口红利下降等。 今天我们就来分析一下我们国家的人口数据吧! 更多有趣分析教程,扫描下方二维码关注vx公号「裸睡的猪」 即可查看! 一、背景 1.人口突破14亿 2020年1月17日,国家统计局发布
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。 再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。 下文是原回答,希望能对你能有所启发。 如果我说,这个世界上人真的分三六九等,...
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合...
死磕Lambda表达式(二):Lambda的使用
在哪使用Lambda表达式?怎么样正确的使用Lambda表达式?
史上最牛逼的 Eclipse 快捷键,提高开发效率!
如果你在使用IDEA,请参考博主另外的一篇idea快捷键的博客。
在三线城市工作爽吗?
我是一名程序员,从正值青春年华的 24 岁回到三线城市洛阳工作,至今已经 6 年有余。一不小心又暴露了自己的实际年龄,但老读者都知道,我驻颜有术,上次去看房子,业务员肯定地说:“小哥肯定比我小,我今年还不到 24。”我只好强颜欢笑:“你说得对。” 从我拥有记忆到现在进入而立之年,我觉得,我做过最明智的选择有下面三个: 1)高中三年,和一位女同学保持着算不上朋友的冷淡关系;大学半年,把这位女同学追到...
CSS操作之你不得不知的一些小技巧(一)ヾ(Ő∀Ő๑)ノ太棒了!!
目录 CSS单行/多行文本,超出隐藏并显示省略号 1. CSS单行/多行文本,超出隐藏并显示省略号 方法一:使用CSS属性 单行文本溢出显示省略号 width: 100px; overflow: hidden; text-overflow:ellipsis; //文本溢出显示省略号 white-space: nowrap; //文本不会换...
强烈推荐 10 款珍藏的 Chrome 浏览器插件
Firebug 的年代,我是火狐(Mozilla Firefox)浏览器的死忠;但后来不知道为什么,该插件停止了开发,导致我不得不寻求一个新的网页开发工具。那段时间,不少人开始推荐 Chrome 浏览器,我想那就试试吧,期初我觉得用起来很别扭,毕竟我不是一个“喜新厌旧”的人。但用的次数越来越多,也就习惯了。 Chrome 浏览器有一个好处,就是插件极其丰富,只有你想不到的,没有你找不到的,这恐怕是...
我以为我对数据库索引十分了解,直到我遇到了阿里面试官。
索引的数据结构分析,数据库面试到索引最常见的问题分析,我总结了一下。
相关热词 c# singleton c#中类的默认值是 c#各种进制之间的转换 c# 正则表达式保留汉字 c#后台跨域 c#基础代码大全 c#指定combox选择 c#关系 mono c# 相差毫秒 用c#做一个简易计算器
立即提问