参考:
https://blog.csdn.net/wyxeainn/article/details/79600897
https://blog.csdn.net/Shezzer/article/details/84075635
https://www.tecmint.com/install-apache-web-server-on-ubuntu-18-04/
一、安装Apache
安装apache2服务器:
sudo apt-get install apache2
查看状态:
service apache2 restart/status/start/stop
或者用:
sudo systemctl status apache2
可以用以下命令manage the Apache service:
$ sudo systemctl status apache2
$ sudo systemctl stop apache2
$ sudo systemctl start apache2
$ sudo systemctl restart apache2
$ sudo systemctl reload apache2
$ sudo systemctl enable apache2
$ sudo systemctl disable apache2
Next, if you have the UFW firewall enabled and running on your system, you need to open the ports 80 and 443 to allow client requests to Apache web server via HTTP and HTTPS respectively, then reload the firewall settings using following commands.
(关闭防火墙80/443限制:ufw是Ubuntu附带的,相对于iptables简单很多的防火墙,即uncomplicated firewall,不复杂的防火墙,繁琐部分的设置还是需要去到iptables。可以用 sudo ufw status 来查看防火墙状态,其它ufw的具体操作请看这里)
$ sudo ufw allow 80/tcp
$ sudo ufw allow 443/tcp
$ sudo ufw reload
查看当前启动和运行apache的用户:
ps -ef | grep httpd
查看/html文件夹下文件和文件夹权限(一般drwx-rx-rx没有问题,755):
ls -l /var/www/html/website
如果不是(意思如果操作wordpress过程中出现“无法创建目录”的情况

本文详细介绍了如何在Ubuntu 16.04服务器上安装和配置WordPress,包括安装Apache、MySQL、PHP,配置WordPress,以及解决访问和权限问题。通过设置Apache服务器,创建数据库,安装phpMyAdmin,并调整权限,实现用域名或IP直接访问WordPress站点。
最低0.47元/天 解锁文章
1682

被折叠的 条评论
为什么被折叠?



