Postfix+Dovecot+Roundcube开源邮件系统搭建系列5:Roundcube安装配置(含Nginx+PHP部署配置)

1. PHP安装配置

参考wordpress 6.5.2版本安装记录 中关于PHP安装方法,此处不再详述。

修改php-fpm的启动用户和组为vmail,这一步是和nginx配置相呼应。配置文件/etc/opt/remi/php83/php-fpm.d/www.conf 下面几个配置:

user vmail
group vmail
listen.acl_users = vmail
#access.log = /var/opt/remi/php83/log/php-fpm/$pool.access.log #可选配置
listen = /var/opt/remi/php83/run/php-fpm/www.sock # 这个配置需要记录一下,下面nginx的配置需要用到

配置启动php-fpm:

systemctl enable php83-php-fpm
systemctl start php83-php-fpm

2. Nginx安装配置

2.1 安装nginx

yum install nginx

2.2 /etc/nginx/nginx.conf 配置文件

user  vmail; #以vmail身份运行,下面会涉及相关的配置
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    # 日志文件位置
    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

2.3 /etc/nginx/conf.d/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值