在Nginx下搭建好PHP+MYSQL的环境后,就可以安装Joomla。由于Joomla采用了url rewrite方式来控制访问,因此需要对其进行一些特别的配置。
Joomla的主页:http://www.joomla.org/,下载链接为:http://joomlacode.org/gf/download/frsrelease/15278/66555/Joomla_1.7.0-Stable-Full_Package.zip
Nginx的配置文件nginx.conf部分内容如下(只写了server部分的):
server {
listen 8080;
server_name 127.0.0.1;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root D:\php\joomla;
index index.html index.htm index.php install.php;
try_files $uri $uri/ /index.php?q=$request_uri;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root D:\php\joomla;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME D:\php\joomla$fastcgi_script_name;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
红色部分是针对Joomla的配置,蓝色部分是针对php-fpm()的配置。
同时,在fastcgi_params文件中还需要增加以下内容:
fastcgi_buffers 256 16k;
fastcgi_buffer_size 32k;
fastcgi_buffer_size 32k;
如果不增加以上内容的话,访问某些php页面(例如管理页面),会报告错误“502 bad gateway”
相关推荐
CentOS7 自动化搭建Nginx+PHP7+Mysql+Docker+Docker-Compose Shell脚本,Docker version 18.06.1-ce,docker-compose version 1.22.0
Linux+Nginx+Mysql+Php安装教程
国产中标麒麟操作系统nginx+tomcat+redis+mysql安装部署手册(CSDN).zip
docker-compose php7.3.4-fpm+nginx+mysql配置
本手册的编写初衷是笔者在安装部署项目过程中,网上信息很多,坑也很多,或多或少都有些问题,而且文件内容都不全面,整个部署过程就是慢慢填坑的过程. 1.本手册着重点放在把所有安装部署过程记录完整详细。 2.本...
centos7.2 Nginx1.12 + PHP7.1 + Mysql5.6 安装教程,希望对大家有用
nginx+php+mysql资源集 包含: php-7.1.8.tar.gz mysql-5.6.42.tar.gz nginx-1.8.1.tar.gz libxml2-2.9.1.tar.gz ...nginx+php+mysql资源集里包含了在 Linux环境下配置nginx+php+mysql所需要的资源
linux+nginx+php+mysql环境配置指南.pdf
Nginx+PHP+MySQL (Windows版)
keepalived+nginx+tomcat+redis+mysql所需的jdk包,之前csdn不让上传超过200m得只能分开上传。
Win+Nginx+PHP+MySQL环境搭建.docx
1、基于vue+python+flask+uwsgi+nginx+mysql的外包项目网站项目源码.zip 2、该资源包括项目的全部源码,下载可以直接使用! 3、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为...
alpine创建lnmp环境alpine安装nginx+php5.6+mysql
nginx+apache+mysql+php+memcached+squid搭建门户网站
Ubuntu+Nginx+Mysql+Php安装配置详解
Nginx+php+mysql+phpmyadmin引擎管理器C++源码,本人自写的小软件,服务一键安装、卸载、启用、停用。替换版本也很方便
简单的一键部署PHP调试环境,适合初学者。集成最新的Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader
Linux下Nginx+PHP+MySQL配置(图) 已经说得很详细了!
这是nginx+php+mysql的本地windows测试环境 在u盘运行的web环境有usbwebserver,但是apache配置https没有nginx方便, 使用方式: start.bat启动 stop.bat停止 restart.bat重启
详细说明了windows服务器nginx+tomcat+mysql部署及配置(配置阿里云后台安全组,配置域名)很适合新手学习 附件中包含: 1.操作说明文档 2.操作录屏 3.安装所用到的软件安装包 1)Windows Server 2019 数据中心版 ...