.

Tweak Nginx å tjene Lengre Domain Names - VPS Bibelen # 15

English English (change)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

EDIT / øke server_names_hash_bucket_size

server-navn-hash-bøtte bilde

Hvis du bruker Nginx, og domenenavnet overstiger 32 tegn, kan du få en feilmelding når du starter webserveren.

Ganske sannsynlig, må du fortelle Nginx å tillate lengre domenenavn.

For å gjøre dette, åpne konfigurasjonsfil. For du har installert Nginx bruker en pakkebehandler, får du tilgang til dette med: --

Sett opp et unmanaged VPS (4 Newbies) .. VPS Bibelen

I 20 kopier / lim trinn .. fra null til helten, tomme boksen til søt-og Linux-server.

Bla ned for full serie indeksen.

Så hei, shed delte & viva virtuelt! Håper det hjelper. The_guv

sudo nano /etc/nginx/nginx.conf

For others, who compiled from source:-

sudo nano /usr/local/nginx/conf/nginx.conf

.. and in there, within the http section, that looks like this ..

http {
#various settings here
}
Just add this line:-
server_names_hash_bucket_size 64;

Save the file.

Reboot nginx:-

sudo /etc/init.d/nginx restart

And your longer domain name should work. If the name is longer than 64 characters, swap the '64' value for 128, but I pity your users :)


If you liked that ...
... maybe you'll like these?

.