有没有一种有效的方法可以在 bitnami nginx 中安装 wordpress?
Is there an effective way to install wordpress in bitnami nginx?
我尝试按照此 link 中有关在 bitnami nginx 中安装 wordpress 的说明进行操作:https://docs.bitnami.com/aws/how-to/install-wordpress-nginx/#step-1-prepare-your-nginx-server 但它似乎不起作用,因为它不显示 wordpress 安装页面。
顺便说一句,我是 运行 bitnami nginx 在 Windows.
这是我所做的(注意:我没有使用控制台,因为我正在使用 Windows):
方法 A:使用系统包安装 Bitnami
- 下载最新版本的WordPress并将文件解压到/opt/bitnami/wordpress/目录:
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/wordpress
For 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= 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= 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= 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= last;
}
include "C:/Bitnami/nginxstack-1.18.0-9/nginx/conf/bitnami/*.conf";
}
- 重启 NGINX:
sudo /opt/bitnami/ctlscript.sh restart nginx
For Windows just turn on the nginx from the bitnami control panel
这里是 Bitnami 开发者,
您使用的指南中的方法 A 对 Windows 安装程序无效。您应该改用方法 B。要重新启动服务,请使用管理器-windows.exe 工具。
https://docs.bitnami.com/installer/infrastructure/wamp/administration/control-services-windows/
我尝试按照此 link 中有关在 bitnami nginx 中安装 wordpress 的说明进行操作:https://docs.bitnami.com/aws/how-to/install-wordpress-nginx/#step-1-prepare-your-nginx-server 但它似乎不起作用,因为它不显示 wordpress 安装页面。
顺便说一句,我是 运行 bitnami nginx 在 Windows.
这是我所做的(注意:我没有使用控制台,因为我正在使用 Windows):
方法 A:使用系统包安装 Bitnami
- 下载最新版本的WordPress并将文件解压到/opt/bitnami/wordpress/目录:
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/wordpress
For 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= 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= 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= 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= last;
}
include "C:/Bitnami/nginxstack-1.18.0-9/nginx/conf/bitnami/*.conf";
}
- 重启 NGINX:
sudo /opt/bitnami/ctlscript.sh restart nginx
For Windows just turn on the nginx from the bitnami control panel
这里是 Bitnami 开发者,
您使用的指南中的方法 A 对 Windows 安装程序无效。您应该改用方法 B。要重新启动服务,请使用管理器-windows.exe 工具。
https://docs.bitnami.com/installer/infrastructure/wamp/administration/control-services-windows/