vhost /1234...htm @php - How to get the number?

Discussion in 'General' started by Mario Liedtke, Mar 13, 2015.

  1. Mario Liedtke

    Mario Liedtke New Member

    Hello,
    I have some trouble getting Wordpress running with Permalinks in ONE webspace on one domain. On others it is working!
    I am afraid that I messed accidently around with that unique number that is in /etc/nginx/sites-available/domain-xyz.vhost

    (Oh, btw: I installed a server from the NGINX/ISPCONFIG/DEBIAN Tutorial)

    Since then I also get that message when restarting nginx:
    root@yona:/etc/nginx/sites-available# /etc/init.d/nginx restart
    Restarting nginx: nginx: [warn] conflicting server name "domain-xyz.de" on 0.0.0.0:80, ignored
    nginx: [warn] conflicting server name "www.domain-xyz.de" on 0.0.0.0:80, ignored

    I guess that the number in that section is wrong - I remember that I (when I was tired) copy/pasted a whole xyz.vhost for comfort reasons and got probs with the two domains then. The one I have deleted, the other still is a bit broken. Everything but the permalinks works, but now I need them.

    location ~ \.php$ {
    try_files /127843bc..............50401fa9b.htm @php;
    }

    (dots to hide the code only)

    MY QUESTION THEREFOR IS:
    How can I calculate/get that string/number in the try_files line for a domain?
    And: Could that be the reason for my permalink issue?

    Thank you in advance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This number does not matter. It is just a filename that amy not exist in the filesystem. so you can even replace it with "thisfiledoesnotexist.php".

    Your nginx error means that you have a duplicate domain name. probably you have configured one manually and then added another one in ispconfig or your server hostname is this domain name and not a subdomain.

    For wordpress permalinks, just add this into the nginx directives field:

    Code:
    location / {
    try_files $uri $uri/ /index.php?$args;
    }
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
    expires max;
    log_not_found off;
    }
    
     
    Mario Liedtke likes this.
  3. Mario Liedtke

    Mario Liedtke New Member

    Oki, thanks. So I can ignore the "strange number section".

    I took a peek for the domain name in the database "dbispconfig" and a search showed 1 Hit in "web_domain" but 5 in "sys_datalog" which seems no issue.
    The ISPCONFIG -> SYSTEM shows another domain as the server domain.
    I overwrote my code in ISPCONFIG -> WEBSITES -> OPTIONS -> nginx Directives with your code.
    Then I did a /etc/init.d/nginx restart and tried if Permalinks work. Not yet. I am totally clueless as I cross tested it on the same server in another domain and there it is working.
    The Warning message on restart is still there, too.
     
    Last edited: Mar 13, 2015
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Dont search in the ispconfig database, your issue is not in ispconfig as you cant enter that duplicate domain in ispconfig. search in the shell:

    comamnds:

    hostname
    hostname -f

    grep -r www.domain-xyz.de /etc/nginx
     
    Mario Liedtke likes this.
  5. Mario Liedtke

    Mario Liedtke New Member

    Gives that results back:
    [​IMG]
    Where hostname is correct as in ispconfig set.
    But the m.txt has been the problem. It was a backup file that I made before I edited something...
    Thank you very much. I have totally forgotten that.
    The restart-issue is now gone.
    AND THE PERMALINKS WORK FINE, TOO!

    Thank you very much, till!!!
    I am so sorry that I was to stupid to remember.. (and have to confess that I guessed the problem to be somewhere far, far elsewhere..)
     

Share This Page