Professional Documents
Culture Documents
部署laravel项目到LAMP服务器
部署laravel项目到LAMP服务器
```bash
sestatus
```
**2. 标记文件和目录:**
```bash
ps -eZ | grep httpd
```
```bash
chcon -R -t httpd_sys_content_t /var/www/html/laravel
chcon -R -t httpd_sys_rw_content_t /var/www/html/laravel/storage
chcon -R -t httpd_sys_rw_content_t /var/www/html/laravel/bootstrap/cache
```
- `-t` 标志用于指定目标安全上下文。
```
module laravel 1.0;
require {
type httpd_t;
class file { read write open };
}
- 使用 `checkmodule` 命令编译模块文件:
```bash
checkmodule -M -m -o laravel.mod laravel.te
```
```bash
semodule_package -o laravel.pp -m laravel.mod
```
```bash
semodule -i laravel.pp
```
```bash
systemctl restart httpd
```