当前位置:网站首页>天翼云等服务器配置Apache Web服务
天翼云等服务器配置Apache Web服务
2022-04-22 07:18:00 【_Hello Spring】
天翼云等服务器配置Apache Web服务
系统: ubuntu 16.04
1 安装Apache
sudo apt-get install apache2
2 防火墙操作
// 启用 ufw
ufw enable
// 禁用 ufw
ufw disable
// 查看防火墙状态及规则列表
ufw status
// 重置防火墙
ufw reset
// 列出当前已经集成的应用名称
ufw app list
// 允许该服务
ufw allow <name>
// 以状态码删除规则
ufw delete number
// 指定具体的规则删除
ufw delete allow 80/tcp
// 开启/禁用
sudo ufw allow|deny [service]
// 打开或关闭某个端口
sudo ufw allow smtp // 允许所有的外部IP访问本机的25/tcp (smtp)端口
sudo ufw allow 22/tcp // 允许所有的外部IP访问本机的22/tcp (ssh)端口
sudo ufw allow 53 // 允许外部访问53端口(tcp/udp)
sudo ufw allow from 192.168.1.100 // 允许此IP访问所有的本机端口
sudo ufw allow proto udp 192.168.0.1 port 53 to 192.168.0.2 port 53
sudo ufw deny smtp // 禁止外部访问smtp服务
sudo ufw delete allow smtp // 删除上面建立的某条规则
3 配置修改Apache默认端口(不建议使用80端口,部分服务器不允许)
sudo vim /etc/apache2/ports.conf

sudo vim /etc/apache2/sites-available/000-default.conf

4 重启 apache2 服务
service apache2 restart
配置安全组(添加规则)



输入服务器外网 ip:9080 就可访问

版权声明
本文为[_Hello Spring]所创,转载请带上原文链接,感谢
https://blog.csdn.net/wct3344142/article/details/124318550
边栏推荐
- 双光口保护8E1+8路物理隔离百兆100M以太网络光端机PDH光端机
- 3-1 compare size
- Integrated optical access equipment 4-way 100m isolated Ethernet + 16-way E1 private network service 2m integrated service optical transceiver
- 荧光标记的多肽/氨基酸(FITC修饰/AMC修饰)齐岳生物
- A preliminary understanding of Copula function
- Wechat applet page routing
- 使⽤airtestIDE⽣成脚本,使⽤脚本运⾏
- Differences between routing modes
- winform中网络开发
- LeetCode_118. 杨辉三角_动态规划_int**的学习
猜你喜欢

牛客白月赛6【题解】

酞菁铂cas:14075-08-2|酞菁锌ZnPc|介孔硅@上转换@ZnPc光敏剂100nm以下发射650nm

LeetCode_118. 杨辉三角_动态规划_int**的学习

实验一、数据科学导论——数据科学认知

sql需求处理篇-统计指定某年中有多少个周一至周日

汉源高科8E1专网4路百兆隔离网络PDH光端机E1专网业务16M业务光端机

Hanyuan hi tech PDH optical transceiver double optical port protection + 4-way E1 + 4-way Gigabit Network + 4-way 100m network optical transceiver

双光口1+1备份8路E1+2路千兆隔离网络4路百兆隔离PDH光端机

原来PID是在老王头和老斯基的斗争中诞生的

MySQL advanced view -- View introduction, view crud syntax, check options (cascaded, local), view update, view function, view case
随机推荐
Tensorflow usage notes
3-1 compare size
A preliminary understanding of Copula function
Goweb Foundation
Tita 绩效宝:管理者在绩效考核中犯的8个错误
PWM output of STM32 to steering gear sg90
變種快排:尋找最大的前K個數
LeetCode_ 118. Yanghui triangle_ Dynamic programming_ Int * * learning
Blocking queue
2-15 求组合数
概率论笔记6.3抽样分布
3D 沙盒游戏之人物的点击行走移动
每日一题冲刺大厂第十五天提高组 模
酞菁铂cas:14075-08-2|酞菁锌ZnPc|介孔硅@上转换@ZnPc光敏剂100nm以下发射650nm
MySQL深入学习(三一):PowerDesigner的使用
Variante rapide: trouver le nombre maximum de K premiers
Differences between routing modes
Phthalocyanine platinum CAS: 14075-08-2 | zinc phthalocyanine ZnPc | mesoporous silicon @ upconversion @ ZnPc photosensitizer, emission below 100nm 650nm
Anhydrous glucose CAS: 50-99-7 D (+) - glucose molecular weight: 180.156 molecular formula: C6H12O6 density and boiling point value
Leprechaun green elf magic strikes