after trying three times in other StackExchange Forums, I hope I'm getting an answer here.
I switched my wordpress webserver from apache2 to nginx (please note that I want to use the existing wordpress instance) and now I just can't connect to it. Sometimes I get connection refused
and if that's not the case I get 403: Forbidden
.
What is the best solution to fix that problem? My nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
error_log /var/log/nginx_error.log error;
access_log /var/log/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # no sslv3 (poodle etc.)
ssl_prefer_server_ciphers on;
# Gzip Settings
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_min_length 512;
gzip_types text/plain application/x-javascript text/javascript application/$
fastcgi_cache_path /usr/share/nginx/cache/fcgi levels=1:2 keys_zone=microca$
include /etc/nginx/sites-enabled/*.conf;
}
My wordpress.conf:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm;
server_name snapecraft.ddns.net;
access_log /var/log/nginx/vhost1.access.log;
error_log /var/log/nginx/vhost1.error.log;
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Thanks for your help!