apache move to nginx

Discussion in 'Server Operation' started by dfarin, May 22, 2017.

  1. dfarin

    dfarin New Member

    Hey guys,
    i use ispconfig with apache for my old server and now want to move to a new server with nginx. With apache and nginx i have the same problem. If i point a domain to the server that is not configured on the server i get the first web that is configured on the ip.
    With apache i was able to help myself with the following config:

    000-default.conf
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    Redirect 404 /
    ErrorDocument 404 "Page Not Found"
    </VirtualHost>
    <VirtualHost ip1:80 ip2:80 ip3:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    Redirect 404 /
    ErrorDocument 404 "Page Not Found"
    </VirtualHost>
    And now with nginx i tried several hours to get a similar solution, but i dont get it. :(
    Can someone show me a sample config or explain what i have to do for nginx?
    U see i´m not realy an sysadmin and sorry for my bad english. :)
     
  2. ruliezz

    ruliezz Member

    What is your target? Do you want to redirect all traffic to a specific page if a domain not exist?
     

Share This Page