现在的问题是访问主机域名,html目录下php可以正常运行。但是访问phpmyadmin.xxxxx.com域名,html/phpmyadmin下文件会通过浏览器下载。各种搜索改参数无果,求支援。
<code> server {
listen 80;
server_name localhost;
root html;
access_log logs/host.access.log main;
location / {
}
#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;
}
location ~ \.php?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
include vhost/*.conf;
</code><code>server {
listen 80;
server_name phpmyadmin.xxxxx.com;
root html/phpmyadmin;
#charset koi8-r;
access_log logs/phpmyadmin.access.log main;
#error_log log/phpmyadmin.error.log main;
location / {
index index.html index.htm index.php;
}
}
</code>现在的问题是访问主机域名,html目录下php可以正常运行。但是访问phpmyadmin.xxxxx.com域名,html/phpmyadmin下文件会通过浏览器下载。各种搜索改参数无果,求支援。
<code> server {
listen 80;
server_name localhost;
root html;
access_log logs/host.access.log main;
location / {
}
#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;
}
location ~ \.php?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
include vhost/*.conf;
</code><code>server {
listen 80;
server_name phpmyadmin.xxxxx.com;
root html/phpmyadmin;
#charset koi8-r;
access_log logs/phpmyadmin.access.log main;
#error_log log/phpmyadmin.error.log main;
location / {
index index.html index.htm index.php;
}
}
</code>
在你的 phpmyadmin.xxxxx.com 的 vhost 里缺少 fastcgi 的配置,当然不对啦。把你在 localhost 的 vhost 里配置的内容复制过来就差不多对了。
就是以下这些:
<code>error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
</code>
huandu已经解答了
LOGA日志系统即名为"Log AsThis",是如斯开发的日志系统,取简洁,追求效率之意,本日志系统基于PHP+MySQL平台开发,结构简洁,运行速度极快。 LOGA日志系统 5.3.3 更新日志:2018-07-30 [优化]优化后台SESSION; [修复]修复同一域名不同目录安装多个程序潜在问题; [增强]搜索支持extra选项; [更改]群组名,控制器名
150
立即学习“PHP免费学习笔记(深入)”;
你没有配置php解析部分,所谓nginx不知道你要通过什么方式去解析
话说你用的lnmp.org的安装包,不太需要自己修改配置文件吧,顶多加个include *.conf用来解析urlwrite
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号