当前位置: 首页 > wzjs >正文

网站后台代码如何做wordpress门户主题 门户一号下载

网站后台代码如何做,wordpress门户主题 门户一号下载,自助建站系统破解版,下载软件的app大全记录一下我个人部署Linux服务器的心得 环境介绍 ESC服务器创建时默认安装LNMP,即Linux,Nginx,Mysql,Php 所以这里不讲怎么安装Nignx和Mysql 笔者使用的Linux版本为22.0.4LTS版 前端打包 运行React打包命令进行前端项目的打包…

记录一下我个人部署Linux服务器的心得

环境介绍

ESC服务器创建时默认安装LNMP,即Linux,Nginx,Mysql,Php

所以这里不讲怎么安装Nignx和Mysql

笔者使用的Linux版本为22.0.4LTS版

前端打包

运行React打包命令进行前端项目的打包

npm run build

打包后可能生成dist或者build文件夹,这取决于你构建react项目采用的方式

服务器Nginx的网页目录为/var/www/html文件夹,将上述dist或者build文件夹的内容拷贝到这里

注意:不要将整个文件夹拖入,因为dist或者build文件夹无法识别

服务器Nginx的配置目录为/etc/nginx文件夹,打开nginx.conf文件

 可以看到它包括了下面两个配置

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

我们修改下面那个里面的默认配置文件,同时解决跨域问题

##
# 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.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
### Default server configuration
#
server {listen 80;listen [::]:80;# SSL configuration## listen 443 ssl default_server;# listen [::]:443 ssl default_server;## Note: You should disable gzip for SSL traffic.# See: https://bugs.debian.org/773332## Read up on ssl_ciphers to ensure a secure configuration.# See: https://bugs.debian.org/765782## 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 PHPindex index.php index.html index.htm index.nginx-debian.html;server_name 39.106.52.24;location /api/ {proxy_pass http://localhost:8081/;  # 后端服务地址proxy_redirect off;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Scheme  $scheme;      # 传递协议proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header Cookie $http_cookie;}location / {# First attempt to serve request as file, then# as directory, then fall back to displaying a 404.try_files $uri $uri/ =404;}# pass PHP scripts to FastCGI server#location ~ \.php$ {include snippets/fastcgi-php.conf;##	# With php-fpm (or other unix sockets):fastcgi_pass unix:/run/php/php8.0-fpm.sock;#	# With php-cgi (or other tcp sockets):#	fastcgi_pass 127.0.0.1:9000;}#}# 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;
#	}
#}

后端打包

笔者项目使用gradle创建,所以运行下面命令

gradlew build

接着把build文件夹下的libs中生成的jar文件拷贝到云服务器运行即可

java -jar Sapling-0.0.1-SNAPSHOT.jar

有一种方法可以让jar一直在服务器后台运行。方法就是用下面这行命令运行jar包

nohup java -jar /opt/tracker/Sapling-0.0.1-SNAPSHOT.jar &//注意这里还有& 不要忘记了。


文章转载自:

http://Kj9uvP3G.LrfLh.cn
http://J9OKV4Gr.LrfLh.cn
http://iyMA8ueS.LrfLh.cn
http://9rCZKhMQ.LrfLh.cn
http://SePDLGpY.LrfLh.cn
http://TkAbEGlA.LrfLh.cn
http://g9oq1tn3.LrfLh.cn
http://vzUQ2gSL.LrfLh.cn
http://eMUigzhk.LrfLh.cn
http://NN5pfLKA.LrfLh.cn
http://uPtGBKx5.LrfLh.cn
http://gMCWENJT.LrfLh.cn
http://yXq5olOD.LrfLh.cn
http://cSGFV67g.LrfLh.cn
http://bu6sME05.LrfLh.cn
http://bDluyNN1.LrfLh.cn
http://G9SGdKmX.LrfLh.cn
http://6cQOIHjO.LrfLh.cn
http://OR7zFWIQ.LrfLh.cn
http://cISDQfh8.LrfLh.cn
http://wpHs41lk.LrfLh.cn
http://NujHRUKs.LrfLh.cn
http://Fc0btJnl.LrfLh.cn
http://73KH9Bib.LrfLh.cn
http://k5yWFp6E.LrfLh.cn
http://y4D3kR2D.LrfLh.cn
http://5KrwyxZS.LrfLh.cn
http://Z2Ghg38S.LrfLh.cn
http://yonbMNRB.LrfLh.cn
http://iX4SllZC.LrfLh.cn
http://www.dtcms.com/wzjs/745748.html

相关文章:

  • 网站开发设计心得龙岗菠菜网站建设
  • 用flash做的经典网站网站上的图片格式怎么做
  • 黄岛做网站哪家好公司网站规划案例
  • 建设银行临夏分行网站asp.net mvc 网站开发
  • 网站建设基础心得邯郸市出租房屋信息网
  • axrue怎么做网站的原型图网络营销策划步骤
  • 图片在线制作网站yellow的视频播放
  • 建立网站外链常用的渠道有哪些wordpress连接微博源码
  • 国内设计网站公司1771wan网页游戏
  • 网站建设专家如何选汕头网站推广排名
  • 西安网站建设服务商推广普通话奋进新征程宣传语
  • 网站搭建公司排行学做网站论坛插件
  • 蓝牙音箱东莞网站建设直播平台开发多少钱
  • 汽车行业网站建设方案达州市住房和建设厅网站
  • 虚拟主机网站怎么上传文件遨游建站
  • 潍坊市房屋和城乡建设局网站网站开发的收入
  • 建设网站如何加入搜索网站开发vs2015是什么
  • 网站建设全屏广州网站建设全包
  • 网站服务器有哪些种类给个网站可以在线
  • 网站建设与维护 出题狮山公司网站建设
  • 门户网站改造方案阿里巴巴每平每屋设计家官网
  • 如何做网站赚钱6毕业生就业推荐表模板网站开发
  • 商水县建设局网站网站构造下拉列表怎么做
  • 统计网站建设程序网站开发基本要求
  • 无域名网站 能否被百度天津微信网站
  • 苏宁易购的网站建设企业网站建设任务书
  • wordpress建站图片效果网站建设哪家合适
  • 求免费的那种网站有哪些海口专业网站制作策划
  • 厦门网站建设定制多少钱如何查看网站是谁建设的
  • jq效果较多的网站有些电影网站是怎么做的