我试着按照这个链接中有关在bitnami中安装wordpress的说明:https://docs.bitnami.com/aws/how-to/install-wordpress-nginx/#step-1-prepare-your-nginx-server,但是它似乎不能工作,因为它没有显示wordpress安装页面。
顺便说一下,我正在Windows中运行bitnami。
下面是我所做的(注意:我没有使用控制台,因为我使用的是Windows):
方法A:使用系统包安装Bitnami
cd /tmp
wget https://wordpress.org/latest.tar.gz
sudo tar xfvz latest.tar.gz -C /opt/bitnami/ For Windows
it's C:/Bitnami/nginxstack-1.18.0-9/sudo chown -R bitnami:daemon /opt/bitnami/wordpress
sudo chmod -R g+w /opt/bitnami/wordpressFor Windows
it's C:/Bitnami/nginxstack-1.18.0-9/wordpress
added the wordpress files here创建和编辑/opt/bitnami/nginx/conf/server_blocks/wordpress-server-block.conf文件并添加配置块的
server {
listen 80 default_server;
root /opt/bitnami/wordpress;
# Catch-all server block
# See: https://nginx.org/en/docs/http/server_names.html#miscellaneous_names
server_name _;
index index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
if (!-e $request_filename)
{
rewrite ^/(.+)$ /index.php?q=$1 last;
}
include "/opt/bitnami/nginx/conf/bitnami/*.conf";
}For Windows
create and edit the C:/Bitnami/nginxstack-1.18.0-9/nginx/conf/server_blocks/wordpress-server-block.conf and add the configuration block shown below:
server {
listen 80 default_server;
root "C:/Bitnami/nginxstack-1.18.0-9/wordpress";
# Catch-all server block
# See: https://nginx.org/en/docs/http/server_names.html#miscellaneous_names
server_name _;
index index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
if (!-e $request_filename)
{
rewrite ^/(.+)$ /index.php?q=$1 last;
}
include "C:/Bitnami/nginxstack-1.18.0-9/nginx/conf/bitnami/*.conf";
}创建和编辑/opt/bitnami/nginx/conf/server_blocks/wordpress-https-server-block.conf文件并添加配置块的
server {
# Port to listen on, can also be set in IP:PORT format
listen 443 ssl default_server;
root /opt/bitnami/wordpress;
# Catch-all server block
# See: https://nginx.org/en/docs/http/server_names.html#miscellaneous_names
server_name _;
ssl_certificate bitnami/certs/server.crt;
ssl_certificate_key bitnami/certs/server.key;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
if (!-e $request_filename)
{
rewrite ^/(.+)$ /index.php?q=$1 last;
}
include "/opt/bitnami/nginx/conf/bitnami/*.conf";
}For Windows
create and edit C:/Bitnami/nginxstack-1.18.0-9/nginx/conf/server_blocks/wordpress-https-server-block.conf and add the configuration block shown below:
server {
# Port to listen on, can also be set in IP:PORT format
listen 443 ssl default_server;
root "C:/Bitnami/nginxstack-1.18.0-9/wordpress";
# Catch-all server block
# See: https://nginx.org/en/docs/http/server_names.html#miscellaneous_names
server_name _;
ssl_certificate bitnami/certs/server.crt;
ssl_certificate_key bitnami/certs/server.key;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
if (!-e $request_filename)
{
rewrite ^/(.+)$ /index.php?q=$1 last;
}
include "C:/Bitnami/nginxstack-1.18.0-9/nginx/conf/bitnami/*.conf";
}sudo /opt/bitnami/ctlscript.sh restart nginxFor Windows just turn on the nginx from the bitnami control panel发布于 2021-01-25 10:47:34
这里的Bitnami开发者
您正在使用的指南中的方法A对Windows安装程序无效。你应该用B方法代替。要重新启动服务,请使用manager-windows.exe工具。
https://docs.bitnami.com/installer/infrastructure/wamp/administration/control-services-windows/
https://stackoverflow.com/questions/65880428
复制相似问题