<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Ahoj,<br>
<br>
mam to takto:<br>
<br>
server {<br>
listen 80;<br>
server_name domena.com;<br>
<br>
dalsi veci ...<br>
}<br>
<br>
Z manualu nginx je to vypsane nasledovne:<br>
<br>
pokud mam linux a je nastaveno v sysctl.conf <code><font
face="sans-serif">net.ipv6.bindv6only=0 (default)<br>
tak to posloucha na v4 i v6....<br>
<br>
pro BSD a pokud nastavim moznost vyse na 1, tak musim bindovat
v4 a v6 zvlast tak jak napsal<br>
Petr ...<br>
<br>
pokud neprehodis moznost bindv6only=1, tak ten tvuj config bude
chcipat na bind() already in use ..<br>
<br>
<br>
Zkousel jsem oboje, i s pripsanym obojim v configu, a vetsinou
byla stranka dostupna na v6, ale v4 me hazela na jinou
hostovanou domenu ...<br>
<br>
Muj config na kterem to testuju (includuje se z hlavniho):<br>
bindipv6only=1<br>
<br>
server {<br>
listen 80;<br>
listen [::]:80;<br>
server_name <a class="moz-txt-link-abbreviated" href="http://www.nemec.lu">www.nemec.lu</a>;<br>
<br>
rewrite ^.*$ <a class="moz-txt-link-freetext" href="http://nemec.lu/">http://nemec.lu/</a> permanent; <br>
}<br>
<br>
server {<br>
listen 80 default_server;<br>
listen [::]:80 default_server;<br>
client_max_body_size 2G;<br>
<br>
server_name nemec.lu;<br>
<br>
access_log /home/nginx/wysiwyg/access.log;<br>
error_log /home/nginx/wysiwyg/error.log;<br>
<br>
location / {<br>
include uwsgi_params; <br>
root /home/lukas/wysiwyg;<br>
uwsgi_pass 127.0.0.1:3030;<br>
}<br>
<br>
# force to use https for /admin<br>
location /admin/ {<br>
rewrite "^(.*)" <a class="moz-txt-link-freetext" href="https://$host$1">https://$host$1</a> permanent;<br>
}<br>
<br>
location /media/ {<br>
alias /home/nginx/wysiwyg/media/;<br>
access_log off;<br>
expires 7d;<br>
autoindex on;<br>
}<br>
<br>
location /static/ {<br>
alias /home/nginx/wysiwyg/static/;<br>
access_log off;<br>
expires 7d;<br>
}<br>
}<br>
<br>
server {<br>
listen 443 ssl default_server;<br>
listen [::]:443 ssl default_server;<br>
client_max_body_size 2G;<br>
<br>
ssl_certificate /etc/nginx/cert/server.crt;<br>
ssl_certificate_key /etc/nginx/cert/server.key;<br>
<br>
server_name nemec.lu <a class="moz-txt-link-abbreviated" href="http://www.nemec.lu">www.nemec.lu</a>;<br>
<br>
access_log /home/nginx/wysiwyg/access.log;<br>
error_log /home/nginx/wysiwyg/error.log;<br>
<br>
location / {<br>
include uwsgi_params; <br>
root /home/lukas/wysiwyg;<br>
uwsgi_pass 127.0.0.1:3030;<br>
}<br>
<br>
location /media/ {<br>
alias /home/nginx/wysiwyg/media/;<br>
access_log off;<br>
expires 7d;<br>
}<br>
<br>
location /static/ {<br>
alias /home/nginx/wysiwyg/static/;<br>
access_log off;<br>
expires 7d;<br>
}<br>
<br>
<br>
Dikec, <br>
<br>
Lukas Nemec<br>
</font></code>
</body>
</html>