i have a server
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
access_log /var/log/nginx/localhost.access.log;
location ~* \.(png|ico)$ {
root /home/anatoly/gyazo;
}
location / {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Ho
Configuring a local development linux box I'd like to have some sneaky Apache2 configuration which would do the following, when I request 'sub.domain.tld.local':
1.) Serve from: vhost/domain.tld/sub/htdocs/
2.) If there's no such directory, serve from: vhost/sub.domain.tld/htdocs/
3.) If there's no such directory, serve from: vhost/domain.tld/htdocs/
'.local' is just a static "suffix" which sho
I'm trying to configure Nginx to proxy stuff on a subdomain: dev.int.com
I want dev.int.com to be proxied to IP:8080, and dev.int.com/stash to be proxied to IP:7990
Here's my current config file
server {
listen 80;
server_name dev.int.com;
access_log off;
location / {
proxy_pass http://IP:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote
I have a few questions about this configuration file "default" in /etc/nginx/sites-enabled.
How to use custom virtual host in apache like nginx? Nginx example:
server {
listen 80;
server_name ~^(.*).dev.domain$;
location / {
proxy_pass http://$1.domain:8080;
proxy_set_header X-Real-IP $remote_addr;
}
}
In apache i planed like this:
<VirtualHost *:8080>
DocumentRoot /home/$1
ServerName (.*).mrtigra.info
</VirtualHost>
Here's my abbreviated nginx vhost conf:
upstream gunicorn {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
listen 443 ssl;
server_name domain.com ~^.+\.domain\.com$;
location / {
try_files $uri @proxy;
}
location @proxy {
proxy_pass_header Server;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_hea
Originally I had a server with nginx running multiple websites. I added Varnish in front to be on port 80 and changed my nginx files to 8080. The problem I'm having is that only one site is working while the others are not.
I have the following configuration in nginx:
location /static/ {
root /srv/kose/;
expires 2w;
access_log off;
}
location / {
proxy_pass http://127.0.0.1:8089;
}
If a file is not found in /static/, I want to serve a default image, and not proxy_pass to 8089.
I have been trying to setup my local system so that typing in a local tld goes to the relevant htdocs subfolder, but cannot get it to work.
I am currently for every project, creating a folder in my htdocs e.g.