0%

华为服务器

ssh连接服务器

1
ssh username@hostname

其中,username 是您的用户名,hostname 是目标服务器的主机名或IP地址,然后输入密码。

SCP命令传输文件到目标服务器

1
scp /path/to/local/file username@hostname:/path/to/remote/directory

其中,/path/to/local/file 是本地文件的路径,username 是您的用户名,hostname 是目标服务器的主机名或IP地址,/path/to/remote/directory 是目标服务器上已创建的目录路径。

查看nginx实际调用的配置文件

1.查看nginx路径

1
2
3
4
5
root@hcss-ecs-d6be:/etc# ps aux|grep nginx
root 538024 0.0 0.0 15672 1004 ? Ss Aug10 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 538025 0.0 1.4 37932 25888 ? S Aug10 0:00 nginx: worker process
nginx 538026 0.0 1.4 37924 25864 ? S Aug10 0:05 nginx: worker process
root 927076 0.0 0.1 6476 2252 pts/0 S+ 14:28 0:00 grep --color=auto nginx

nginx的路径为:/usr/sbin/nginx

2.查看nginx配置文件路径

1
2
3
root@hcss-ecs-d6be:/etc# /usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

nginx的配置文件路径为: /etc/nginx/nginx.conf

网页访问路径为:/usr/share/nginx/html

ps 命令

1
2
3
4
5
root@hcss-ecs-d6be:/etc# ps aux|grep nginx
root 538024 0.0 0.0 15672 1004 ? Ss Aug10 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 538025 0.0 1.4 37932 25888 ? S Aug10 0:00 nginx: worker process
nginx 538026 0.0 1.4 37924 25864 ? S Aug10 0:05 nginx: worker process
root 927128 0.0 0.1 6476 2428 pts/0 S+ 14:33 0:00 grep --color=auto nginx
------------- Thank you for reading -------------

Title - Artist
0:00