I tried to follow the instructions regarding installing wordpress in bitnami nginx from this link: https://docs.bitnami.com/aws/how-to/install-wordpress-nginx/#step-1-prepare-your-nginx-server but it seem not to work because it doesn't display the wordpress installation page.
By the way, I am running bitnami nginx in Windows.
Here's what I did (Note: I didn't use console because I am using Windows):
Approach A: Bitnami Installations Using System Packages
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
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";
}
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 nginx
For Windows just turn on the nginx from the bitnami control panel
Bitnami developer here,
The approach A in the guide you are using is not valid for Windows installers. You should use approach B instead. For restarting the services, please use the manager-windows.exe tool.
https://docs.bitnami.com/installer/infrastructure/wamp/administration/control-services-windows/