docker映射window本地文件夹的nginx的虚拟主机配置文件vhost.nginx.conf

本文介绍了一个具体的Nginx服务器配置案例,详细展示了如何通过Nginx配置文件实现对特定域名下PHP应用的支持,包括监听端口、指定根目录、设置FastCGI参数等关键配置。
server {
 listen 80;
 server_name www.domain.com;

 location ~ \.php$ {
 root  /var/www/html/www/test/public;
 fastcgi_pass 127.0.0.1:9000;
 fastcgi_index index.php;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 include fastcgi_params;
 }
 location / {
 root  /var/www/html/www/;
 index  index.php;
 }
}
nginx 16:39:34.17 INFO ==> Welcome to the Bitnami nginx container nginx 16:39:34.17 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers nginx 16:39:34.18 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues nginx 16:39:34.18 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise nginx 16:39:34.19 INFO ==> nginx 16:39:34.19 INFO ==> ** Starting NGINX setup ** nginx 16:39:34.20 INFO ==> Validating settings in NGINX_* env vars nginx 16:39:34.21 WARN ==> The NGINX configuration file '/opt/bitnami/nginx/conf/nginx.conf' is not writable by current user. Configurations based on environment variables will not be applied. Certificate request self-signature ok subject=CN = example.com nginx 16:39:37.24 INFO ==> No custom scripts in /docker-entrypoint-initdb.d nginx 16:39:37.24 INFO ==> Initializing NGINX realpath: /bitnami/nginx/conf/vhosts: No such file or directory nginx 16:39:37.27 INFO ==> ** NGINX setup finished! ** nginx 16:39:37.28 INFO ==> ** Starting NGINX ** 2025/10/13 16:39:37 [warn] 1#1: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /opt/bitnami/nginx/conf/nginx.conf:3 nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /opt/bitnami/nginx/conf/nginx.conf:3
最新发布
10-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值