Skip to content

Instantly share code, notes, and snippets.

@manchoz
Last active April 19, 2018 19:29
Show Gist options
  • Save manchoz/7bad56fb991311657676694aeb4bf9b2 to your computer and use it in GitHub Desktop.
Save manchoz/7bad56fb991311657676694aeb4bf9b2 to your computer and use it in GitHub Desktop.
Esempi HTML
192.168.56.101 sito1.localdomain sito2.localdomain sito3.localdomain sito4.localdomain
server {
listen 80;
server_name sito1.localdomain;
location / {
root /usr/share/nginx/html/sito1;
index index.html index.htm;
}
}
server {
listen 80;
server_name sito2.localdomain;
location / {
root /usr/share/nginx/html/sito2;
index index.html index.htm;
}
}
server {
listen 80;
server_name sito3.localdomain;
location / {
proxy_pass http://localhost:8080;
}
location /downloads {
proxy_pass http://honkytonky.local:8080/;
}
location /lastampa {
proxy_pass http://www.lastampa.it;
}
}
server {
listen 80;
server_name sito4.localdomain;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:3031;
}
}
upstream balancers {
server server1.com;
server server2.com;
server server3.com;
}
server {
listen 80;
server_name sito.com;
location / {
proxy_pass balancers;
}
}
def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return [b"Hello World da uWSGI\n"]
<html>
<h1>Hello World Sito 1</h1>
</html>
<html>
<h1>Hello World Sito 2</h1>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment