网站建设 博采网络 学校,网站开发多久能学会,网站建设对比分析,网站推广方案怎么写1#xff0c;购买云服务器 2#xff0c;配置安全项
云服务器ecs下#xff0c;配置ip、端口所有人都可访问
3#xff0c;关闭防火墙#xff0c;将前端静态项目传输到云服务器上
可以使用SecureCRT#xff0c;本地远程连接到服务器#xff08;需要用户名与密码#x…1购买云服务器 2配置安全项
云服务器ecs下配置ip、端口所有人都可访问
3关闭防火墙将前端静态项目传输到云服务器上
可以使用SecureCRT本地远程连接到服务器需要用户名与密码ip等
关闭防火墙
systemctl stop firewalld --停止Firewalld服务
systemctl disable firewalld --禁止Firewalld在系统启动时自动启动项目可放到/var/www/html下需新建 传文件详见
mac使用crt传输下载文件
传完文件权限设置777
chmod 777 myfolder 4下载并配置nginx
配置.
vim /etc/nginx/nginx.conf #编辑配置文件我的配置文件
user root;#这里需改成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 4096;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;listen [::]:80;root /var/www/html;#这里需改前端文件根目录server_name 144.55.xxx.xx;#这里需改为主机公网ip或域名allow all;#这里允许所有人访问# Load configuration files for the default server block.include /etc/nginx/default.d/*.conf;location / {root /var/www/html/personalWeb;#这里需改前端文件首页目录index index.html;}error_page 404 /404.html;location /40x.html {}error_page 500 502 503 504 /50x.html;location /50x.html {}}
}修改完成后保存重启nginx命令
sudo systemctl restart nginx 5访问
公网id或域名需要备案与配置nginx配置的端口访问