Open luowei opened 4 years ago
配置目录别名
执行命令找到httpd路径
ps aux | grep httpd
查看apache配置文件在哪
/opt/zbox/run/apache/httpd -V | grep "SERVER_CONFIG_FILE"
在/opt/zbox/app/htdocs新建test目录,把dist目录上传到/opt/zbox/app/htdocs/test
修改apache配置文件/opt/zbox/etc/apache/httpd.conf,添加以下配置
Alias /test/ "/opt/zbox/app/htdocs/test/dist/"
<Directory "/opt/zbox/app/htdocs/test/dist">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
重启apache服务器
查看linux中某个端口(port)是否被占用
1.使用lsof
lsof -i:端口号查看某个端口是否被占用
2.使用netstat
使用netstat -anp|grep 80
https://luowei.github.io/list/docs/linux/2012-10-30-Apache%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E9%85%8D%E7%BD%AE.html