NGINX - Wordpress - 403 or loop

Pagina: 1
Acties:

Vraag


Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
Goedemiddag Tweakers,

OPLOSSING:
In /var/www/wordpress/wp-config.php had ik de wp_home URL gedefinieerd met een hoofdletter.
Dit veroorzaakte een oneindige redirect.

code:
1
2
3
4
/**Create URL*/
define('WP_SITEURL', 'http://wordpress.digitalkey.be');
define('WP_HOME', 'http://wordpress.digitalkey.be');
#URLS ZIJN HOOFDLETTER GEVOELIG

Thx to:
@Keuvie

Ik ben een wordpress website aan het starten op NGINX.
PHP 7.2

Wanneer ik de phermalink wijzig van "standaard" naar "Berichtnaam" creëer ik een oneindige redirection volgens de logging.
Enkel op de "home page".
Zodra ik naar een sub pagina ga lukt het wel.
Als ik achter de home pagina /index.php zet lukt het ook.

NOK: http://wordpress.digitalkey.be/

OK: http://wordpress.digitalkey.be/index.php
OK: http://wordpress.digitalkey.be/services/
OK: http://wordpress.digitalkey.be/contact/
OK: http://wordpress.digitalkey.be/about/

Iemand een idee?

Afbeeldingslocatie: https://i.postimg.cc/0KG6G8gb/2019-05-22-16-23-59-Permalink-instellingen-Word-Press.jpg

code:
1
2
/var/log/nginx/error.log
~


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/var/log/nginx/acces.log
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/etc/nginx/sites-enabled/Wordpress.digitalkey.conf

server {
  listen 80;
  server_name 172.10.10.246;
  server_name wordpress.digitalkey.be;

  root /var/www/Wordpress_dig_00;

  index index.php;

  location / {
      try_files $uri $uri/ /index.php?$args;
}
  location ~ \.php$ {
      include snippets/fastcgi-php.conf;
      fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
    }
}


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/etc/nginx/nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}


#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}

[ Voor 92% gewijzigd door Chris-1992 op 24-05-2019 17:38 ]

Beste antwoord (via Chris-1992 op 24-05-2019 17:34)


  • Keuvie
  • Registratie: Oktober 2005
  • Laatst online: 21-09 16:41
Heb je nadat je wijzigingen hebt doorgevoerd in de Nginx config bestanden Nginx opnieuw opgestart?

Zou je de hoofdletter van Wordpress in je home en site URL kunnen aanpassen naar een kleine letter, het lijkt mij niet het probleem te zijn. Maar kan geen kwaad om het te corrigeren.

De redirectloop wordt veroorzaakt door WordPress zelf:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.0 (Ubuntu)
Date: Fri, 24 May 2019 11:57:06 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-UA-Compatible: IE=edge
X-Redirect-By: WordPress
Location: http://Wordpress.digitalkey.be/

Alle reacties


Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 19:22

Hero of Time

Moderator LNX

There is only one Legend

Pas je post even aan om code-blokken te gebruiken. Dat leest wat prettiger. Documenten maak je ook netjes met opmaak ipv een dom plat tekst bestand. ;)

Pas eerst de rechten van de map terug naar 750 of 755 (van mappen) en 640 of 644 (voor bestanden).*

Kijk vervolgens in de logs. Dat is de eerste plek waar je heen gaat om te begrijpen wat er gebeurt en waar je nou tegenaan loopt. Want komt die 403 nou omdat je geen toegang hebt tot de bestanden, of is het wellicht dat je geen toegang hebt tot de php-fpm socket omdat deze onder een andere gebruiker draait?


* Als je maar gelijk met 777 gaat gooien, vraag ik mij af of je überhaupt de webserver publiekelijk toegankelijk moet maken. Want grote kans dat het binnen korte tijd is overgenomen door ongewenste gasten.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@Hero of Time
bedankt voor de snelle reactie!
Ik zal in de toekomst ook letten op mijn opmaak.

Nu heb ik in wordpress onder tab:
Instellingen - Generaal het siteadress (URL) gewijzigd van http://wordpress.digitalkey.be naar http://wordpress.digitalkey.be/index.php en alles werkt correct nu.

Afbeeldingslocatie: https://i.postimg.cc/3yBztTRy/2019-05-21-21-39-47-Algemene-instellingen-Digitalkey-Word-Pre.jpg

[ Voor 20% gewijzigd door Chris-1992 op 21-05-2019 21:50 ]


Acties:
  • 0 Henk 'm!

  • TomsDiner
  • Registratie: November 2014
  • Laatst online: 18-07 23:44
Dat zou niet de oplossing moeten zijn...

Kijk eens naar je menu-links, die worden nu

http://wordpress.digitalkey.be/index.php/services/ (zou http://wordpress.digitalkey.be/services/ moeten zijn)

Je hebt een workaround, maar dit hoort niet... (En waarom trouwens geen SSL? Als je toch met url's bezig bent...)

Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@TomsDiner
De menu-links zijn correct, staat geen index.php tussen..

SSL maak ik aan via let's encrypt, maar eerst alles op punt krijgen :)

Acties:
  • 0 Henk 'm!

  • TomsDiner
  • Registratie: November 2014
  • Laatst online: 18-07 23:44
Kijk eens in je top-menu? Die zijn niet correct.

En home wordt ook fout weergegeven:

http://wordpress.digitalkey.be/index.php/

(Let op laatste /)

Dit werkt misschien, maar het vloekt met de regels.

[ Voor 62% gewijzigd door TomsDiner op 21-05-2019 22:52 ]


Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@TomsDiner
Ik ben niet helemaal mee wat je bedoeld?
Hoe zou het dan moeten uitzien, zie printscreens?

Afbeeldingslocatie: https://i.postimg.cc/9DL27pCH/2019-05-22-08-34-22-Digitalkey-Unlock-your-future.jpg

Afbeeldingslocatie: https://i.postimg.cc/qhf5hhhd/2019-05-22-08-34-30-Services-Digitalkey.jpg

Acties:
  • 0 Henk 'm!

  • TomsDiner
  • Registratie: November 2014
  • Laatst online: 18-07 23:44
Op je homepage ga ik naar het navigatiemenu bovenaan. Als ik met de muis boven services ga hangen, komt er als link in beeld te staan:

http://wordpress.digitalkey.be/index.php/services/

(Geld voor alle links)

Dat het wel werkt als ik erop klik, is ook een feit. Maar de complete url-structuur van de pagina bevat dus nog een fout. Je bent ondertussen al met de template bezig, zie ik, maar ik zou eerst dit repareren. De kans is namelijk dat je ergens zelf een foutje gemaakt hebt wat je niet terug kunt vinden, en soms ga je dat uittesten door weer een blanco installatie te doen...

Het is een feit dat die index.php niet in je basis url hoort. Waarom het alleen werkt als je die wel plaatst weet ik niet. (kan ook aan het htaccess bestand liggen) Kijk maar eens in de bron van de pagina. Alle bestanden (css, js enzovoort) krijgen ook de url met index.php erin. Is dat heel erg? Nou ja, de boel draait, maar zo krijg je straks je sitemap voor google op www.mijnsite.be/index.php/sitemap.xml. En dat mag je uitleggen aan Google, die snapt de locatie niet. Ook andere automatische vaststaande urls zoals favicon en Apple icon staan normaal op een vaste plaats. En dat gaat bij jou momenteel niet werken door die tussenvoeging van index.php.


Daarnaast heb ik best een snelle internet verbinding, maar jou website laad extreem traag. Het is of er een misconfiguratie in zit, die gaat staan wachten op een time-out?

[ Voor 30% gewijzigd door TomsDiner op 22-05-2019 11:20 ]


Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@TomsDiner
Nu zie ik het inderdaad ook.


code:
1
2
/var/log/nginx/error.log
~


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/var/log/nginx/acces.log
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:36 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
172.10.10.243 - - [22/May/2019:10:37:42 +0000] "GET / HTTP/1.0" 301 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/etc/nginx/sites-enabled/Wordpress.digitalkey.conf

server {
  listen 80;
  server_name 172.10.10.246;
  server_name wordpress.digitalkey.be;

  root /var/www/Wordpress_dig_00;

  index index.php;

  location / {
      try_files $uri $uri/ /index.php?$args;
}
  location ~ \.php$ {
      include snippets/fastcgi-php.conf;
      fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
    }
}


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/etc/nginx/nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}


#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}

Acties:
  • 0 Henk 'm!

  • TomsDiner
  • Registratie: November 2014
  • Laatst online: 18-07 23:44
Tja, Ik kan goed roepen wat niet klopt, maar het oplossen.....

Het config bestand ziet er op het eerste gezicht vrij standaard uit. Ik draai zelf Plesk met Apache/NGINX, en heb er nog nooit iets mee te stellen gehad.

Die /etc/nginx/sites-enabled/Wordpress.digitalkey.conf ken ik niet. Ik heb ook een include in het config bestand zitten, maar die wijst naar de lege map modules.conf.d.

Ik ben hier niet goed in thuis, maar kun je dat bovenstaande bestand als test niet eens verwijderen? (Gewoon verplaatsen naar een temp locatie) Het lijkt of daar iets gebeurd (url doorsturen naar index.php) wat Wordpress normaal in het .htaccess bestand regelt... Of de include regel uit de config als test even voorzien van een #...

Acties:
  • 0 Henk 'm!

  • Keuvie
  • Registratie: Oktober 2005
  • Laatst online: 21-09 16:41
TomsDiner schreef op woensdag 22 mei 2019 @ 22:53:
Tja, Ik kan goed roepen wat niet klopt, maar het oplossen.....

Het config bestand ziet er op het eerste gezicht vrij standaard uit. Ik draai zelf Plesk met Apache/NGINX, en heb er nog nooit iets mee te stellen gehad.

Die /etc/nginx/sites-enabled/Wordpress.digitalkey.conf ken ik niet. Ik heb ook een include in het config bestand zitten, maar die wijst naar de lege map modules.conf.d.

Ik ben hier niet goed in thuis, maar kun je dat bovenstaande bestand als test niet eens verwijderen? (Gewoon verplaatsen naar een temp locatie) Het lijkt of daar iets gebeurd (url doorsturen naar index.php) wat Wordpress normaal in het .htaccess bestand regelt... Of de include regel uit de config als test even voorzien van een #...
/etc/nginx/sites-enabled/Wordpress.digitalkey.conf, deze mag op de plek blijven staan waar hij nu staat, dit is namelijk de vhosts en zonder dit bestand werkt de site niet. En aangezien het hier Nginx betreft wordt er niet gekeken naar .htaccess files, deze zijn voor Apache servers.

@Chris-1992 Kan je eens kijken waar de Home en Site url op zijn ingesteld. Dit kan je bij de settings vinden op in de tabel wp_options in het database.

Kan je ook kijken welke foutmelding in `/var/log/nginx/error.log` komt te staan wanneer je de site zonder index.php oproept en je de 403 forbidden krijgt?

[ Voor 9% gewijzigd door Keuvie op 23-05-2019 09:13 ]


Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@Keuvie

Deze heb ik inderdaad vast gezet in de config, niet via Wordpress zelf geconfigureerd.

define('WP_SITEURL', 'http://Wordpress.digitalkey.be');
define('WP_HOME', 'http://Wordpress.digitalkey.be');

Afbeeldingslocatie: https://i.postimg.cc/9RjpZZFV/2019-05-23-19-44-07-My-SQL-Workbench.jpg

Rewrite rule in DB:
code:
1
"index.php?rest_route=/$matches[1]";s:21:"^index.php/wp-json/?$";s:22:"index.php?rest_route=/";s:24:"^index.php/wp-json/(.*)?";s:33:"index.php?rest_route=/$matches[1]";s:47:"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:42:"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:23:"category/(.+?)/embed/?$";s:46:"index.php?category_name=$matches[1]&embed=true";s:35:"category/(.+?)/page/?([0-9]{1,})/?$";s:53:"index.php?category_name=$matches[1]&paged=$matches[2]";s:17:"category/(.+?)/?$";s:35:"index.php?category_name=$matches[1]";s:44:"tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:39:"tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:20:"tag/([^/]+)/embed/?$";s:36:"index.php?tag=$matches[1]&embed=true";s:32:"tag/([^/]+)/page/?([0-9]{1,})/?$";s:43:"index.php?tag=$matches[1]&paged=$matches[2]";s:14:"tag/([^/]+)/?$";s:25:"index.php?tag=$matches[1]";s:45:"type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?post_format=$matches[1]&feed=$matches[2]";s:40:"type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?post_format=$matches[1]&feed=$matches[2]";s:21:"type/([^/]+)/embed/?$";s:44:"index.php?post_format=$matches[1]&embed=true";s:33:"type/([^/]+)/page/?([0-9]{1,})/?$";s:51:"index.php?post_format=$matches[1]&paged=$matches[2]";s:15:"type/([^/]+)/?$";s:33:"index.php?post_format=$matches[1]";s:12:"robots\.txt$";s:18:"index.php?robots=1";s:48:".*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$";s:18:"index.php?feed=old";s:20:".*wp-app\.php(/.*)?$";s:19:"index.php?error=403";s:18:".*wp-register.php$";s:23:"index.php?register=true";s:32:"feed/(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:27:"(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:8:"embed/?$";s:21:"index.php?&embed=true";s:20:"page/?([0-9]{1,})/?$";s:28:"index.php?&paged=$matches[1]";s:27:"comment-page-([0-9]{1,})/?$";s:39:"index.php?&page_id=25&cpage=$matches[1]";s:41:"comments/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:36:"comments/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:17:"comments/embed/?$";s:21:"index.php?&embed=true";s:44:"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:39:"search/(.+)/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:20:"search/(.+)/embed/?$";s:34:"index.php?s=$matches[1]&embed=true";s:32:"search/(.+)/page/?([0-9]{1,})/?$";s:41:"index.php?s=$matches[1]&paged=$matches[2]";s:14:"search/(.+)/?$";s:23:"index.php?s=$matches[1]";s:47:"author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:42:"author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:23:"author/([^/]+)/embed/?$";s:44:"index.php?author_name=$matches[1]&embed=true";s:35:"author/([^/]+)/page/?([0-9]{1,})/?$";s:51:"index.php?author_name=$matches[1]&paged=$matches[2]";s:17:"author/([^/]+)/?$";s:33:"index.php?author_name=$matches[1]";s:69:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:64:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:45:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$";s:74:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&embed=true";s:57:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:81:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]";s:39:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$";s:63:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]";s:56:"([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:51:"([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:32:"([0-9]{4})/([0-9]{1,2})/embed/?$";s:58:"index.php?year=$matches[1]&monthnum=$matches[2]&embed=true";s:44:"([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:65:"index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]";s:26:"([0-9]{4})/([0-9]{1,2})/?$";s:47:"index.php?year=$matches[1]&monthnum=$matches[2]";s:43:"([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:38:"([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:19:"([0-9]{4})/embed/?$";s:37:"index.php?year=$matches[1]&embed=true";s:31:"([0-9]{4})/page/?([0-9]{1,})/?$";s:44:"index.php?year=$matches[1]&paged=$matches[2]";s:13:"([0-9]{4})/?$";s:26:"index.php?year=$matches[1]";s:27:".?.+?/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:37:".?.+?/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:57:".?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:52:".?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:52:".?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:33:".?.+?/attachment/([^/]+)/embed/?$";s:43:"index.php?attachment=$matches[1]&embed=true";s:16:"(.?.+?)/embed/?$";s:41:"index.php?pagename=$matches[1]&embed=true";s:20:"(.?.+?)/trackback/?$";s:35:"index.php?pagename=$matches[1]&tb=1";s:40:"(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:35:"(.?.+?)/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:28:"(.?.+?)/page/?([0-9]{1,})/?$";s:48:"index.php?pagename=$matches[1]&paged=$matches[2]";s:35:"(.?.+?)/comment-page-([0-9]{1,})/?$";s:48:"index.php?pagename=$matches[1]&cpage=$matches[2]";s:24:"(.?.+?)(?:/([0-9]+))?/?$";s:47:"index.php?pagename=$matches[1]&page=$matches[2]";s:27:"[^/]+/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:37:"[^/]+/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:57:"[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:52:"[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:52:"[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:33:"[^/]+/attachment/([^/]+)/embed/?$";s:43:"index.php?attachment=$matches[1]&embed=true";s:16:"([^/]+)/embed/?$";s:37:"index.php?name=$matches[1]&embed=true";s:20:"([^/]+)/trackback/?$";s:31:"index.php?name=$matches[1]&tb=1";s:40:"([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?name=$matches[1]&feed=$matches[2]";s:35:"([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?name=$matches[1]&feed=$matches[2]";s:28:"([^/]+)/page/?([0-9]{1,})/?$";s:44:"index.php?name=$matches[1]&paged=$matches[2]";s:35:"([^/]+)/comment-page-([0-9]{1,})/?$";s:44:"index.php?name=$matches[1]&cpage=$matches[2]";s:24:"([^/]+)(?:/([0-9]+))?/?$";s:43:"index.php?name=$matches[1]&page=$matches[2]";s:16:"[^/]+/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:26:"[^/]+/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:46:"[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:41:"[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:41:"[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$";s:50:"index.php?attachment=$matches[1]&cpage=$matches[2]";s:22:"[^/]+/([^/]+)/embed/?$";s:43:"index.php?attachment=$matches[1]&embed=true";}'


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'Wordpress_dig_00' );

/** MySQL database username */
define( 'DB_USER', 'user' );

/** MySQL database password */
define( 'DB_PASSWORD', 'paswoord' );

/** MySQL hostname */
define( 'DB_HOST', 'SQL IP );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**Create URL*/
define('WP_SITEURL', 'http://Wordpress.digitalkey.be');
define('WP_HOME', 'http://Wordpress.digitalkey.be');


/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         'put your unique phrase here' );
define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );
define( 'LOGGED_IN_KEY',    'put your unique phrase here' );
define( 'NONCE_KEY',        'put your unique phrase here' );
define( 'AUTH_SALT',        'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT',   'put your unique phrase here' );
define( 'NONCE_SALT',       'put your unique phrase here' );

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define( 'WP_DEBUG', false );

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
        define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}

/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );



Geen logging:
code:
1
2
root@srv1804-wordpress-01:/var/www/Wordpress_dig_00# cat /var/log/nginx/error.log
-

[ Voor 152% gewijzigd door Chris-1992 op 23-05-2019 19:48 ]


Acties:
  • Beste antwoord
  • 0 Henk 'm!

  • Keuvie
  • Registratie: Oktober 2005
  • Laatst online: 21-09 16:41
Heb je nadat je wijzigingen hebt doorgevoerd in de Nginx config bestanden Nginx opnieuw opgestart?

Zou je de hoofdletter van Wordpress in je home en site URL kunnen aanpassen naar een kleine letter, het lijkt mij niet het probleem te zijn. Maar kan geen kwaad om het te corrigeren.

De redirectloop wordt veroorzaakt door WordPress zelf:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.0 (Ubuntu)
Date: Fri, 24 May 2019 11:57:06 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-UA-Compatible: IE=edge
X-Redirect-By: WordPress
Location: http://Wordpress.digitalkey.be/

Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@Keuvie
Na iedere aanpassing doe ik een "service nginx restart".
Ik ga de URL nog even aanpassen straks.

Hoe kom jij aan de info in jou post?
Is dat door een curl uit te voeren?

Als ik die permalinks gebruik, is dat dan niet standaard een redirection dat opgezet wordt door Wordpress?

Acties:
  • 0 Henk 'm!

  • Keuvie
  • Registratie: Oktober 2005
  • Laatst online: 21-09 16:41
De info die ik heb is door een curl uit te voeren met de flags I en L:

De I (hoofdletter i) geeft je alleen de headers terug. De L volgt eventuele redirects die je krijgt:

$ curl -IL wordpress.digitalkey.be
HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.0 (Ubuntu)
Date: Fri, 24 May 2019 12:54:16 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-UA-Compatible: IE=edge
X-Redirect-By: WordPress
Location: http://Wordpress.digitalkey.be/

Tevens valt mij nu op dat je twee keer de server_name in /etc/nginx/sites-enabled/Wordpress.digitalkey.conf hebt staan. Is hier een reden voor?

Acties:
  • 0 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@Keuvie
Nee, die mag opzich weg.
Heb al met 1e server_name getest maar ook dat help helaas niet.

Acties:
  • +1 Henk 'm!

  • Chris-1992
  • Registratie: Maart 2018
  • Laatst online: 19-03-2024
@Keuvie
Het was de hoofdletter "W" van wordpress.digitalkey.be die bij WP_HOME voor problemen zorgde.

define('WP_HOME', 'http://wordpress.digitalkey.be');

Wauw! Bedankt :)
Pagina: 1