日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

wordpress安装时网页无法打开-调试办法(还没整理完)

發布時間:2023/12/31 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 wordpress安装时网页无法打开-调试办法(还没整理完) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我用的是ubuntu20.04,相關的php依賴包是7.4

我安裝的php依賴包如下:
root@Desktop:/home/appleyuchi# dpkg --list|grep php

依賴包名稱版本號支持的硬件架構依賴包說明
php-common2:75allCommon files for PHP packages
php-fpm2:7.4+75allserver-side, HTML-embedded scripting language (FPM-CGI binary) (default)
php-gd2:7.4+75allGD module for PHP [default]
php-mysql2:7.4+75allMySQL module for PHP [default]
php7.4-cli7.4.3-4ubuntu2.3amd64command-line interpreter for the PHP scripting language
php7.4-common7.4.3-4ubuntu2.3amd64documentation, examples and common module for PHP
php7.4-fpm7.4.3-4ubuntu2.3amd64server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.4-gd7.4.3-4ubuntu2.3amd64GD module for PHP
php7.4-json7.4.3-4ubuntu2.3amd64JSON module for PHP
php7.4-mysql7.4.3-4ubuntu2.3amd64MySQL module for PHP
php7.4-opcache7.4.3-4ubuntu2.3amd64Zend OpCache module for PHP
php7.4-readline7.4.3-4ubuntu2.3amd64readline module for PHP

所以不同的ubuntu有不同的php依賴包版本,不要照抄我的,根據自己的版本號來做相應的修改

瀏覽器訪問網頁報錯/etc/nginx/error.log報錯解決方案
http://localhost:80/wp-admin/install.php502connect() to unix:/var/run/php/php7.1-fpm.sock failed (2: No such file or directory)nginx.conf中/var/run/php/php7.1-fpm.sock;/var/run/php/php7.4-fpm.sock然后nginx -s reload
登陸之后404[error] 500558#500558: *127 “/usr/share/nginx/html/wp-admin/index.php” is not found (2: No such file or directory), client: 127.0.0.1, server: localhost, request: “GET /wp-admin/ HTTP/1.1”, host: “localhost”, referrer: “http://localhost/wp-login.php”

是否需要編譯版本的nginx
另外,網上有博主說需要自己編譯nginx,
這個可用可不用,我們用自帶的就好了.

文件結構
(Python3.6) appleyuchi@Desktop:~/wordpress$ ls
hello.php wp-admin wp-cron.php wp-settings.php

nginx文件
對應的完整的/etc/nginx/nginx.conf

server {listen 80;listen [::]:80;server_name localhost;root /home/appleyuchi/wordpress;#location / #{#try_files $uri $uri/ /index.php?$query_string;#}index index.php index.html index.htm;location / {try_files $uri $uri/ /index.php?q=$uri&$args;}location ~ \.php$ {try_files $uri =404;fastcgi_split_path_info ^(.+\.php)(/.+)$;fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}#location /wp-includes {#root /home/appleyuchi/wordpress/wp-includes;#autoindex on;# }}

總結

以上是生活随笔為你收集整理的wordpress安装时网页无法打开-调试办法(还没整理完)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。