135 reputation
9
bio website ustunozgur.com
location Turkey
age 30
visits member for 4 years, 3 months
seen Aug 7 at 18:44

Jul
13
awarded  Popular Question
Apr
26
accepted Enabling SPDY for nginx as reverse proxy to Apache
Apr
25
asked Enabling SPDY for nginx as reverse proxy to Apache
Oct
22
accepted Preventing 304 Not Modified Requests with nginx
Oct
21
comment Preventing 304 Not Modified Requests with nginx
Thanks. Yes, I know 304 doesn't transfer data like 200 does, but it seems browser decides how to behave in the end as you say, so there is not much I can do. The question is, why does the browser choose to server some from the cache without making a If-Modified check, and some after making the check.
Oct
19
comment Preventing 304 Not Modified Requests with nginx
Thanks, I gave this a try, I had already set it to 52weeks, max sets it till 2037. It still caches all, doesn't make any requests after that for some but not all of the images, but makes an if-modified-since request for all css and js.
Oct
18
comment Preventing 304 Not Modified Requests with nginx
@Michael Yes, but the client (browser) still communicates with the server to get that 304 info. I'm trying to prevent that request too and just use cached copy without a round-trip.
Oct
18
comment Preventing 304 Not Modified Requests with nginx
I added the Cache-Control header, but it still sends a 304 request instead of using the file in cache.
Oct
18
asked Preventing 304 Not Modified Requests with nginx
Jul
31
comment Restricting nginx website connection to VPN Users on the same server
OK, thank you very much.
Jul
30
awarded  Commentator
Jul
30
comment Restricting nginx website connection to VPN Users on the same server
yes, but even closing access to all sites doesn't seem to work for me. the nginx rule just fails and the last site is used instead, so I get the last site served on that server. It is running on port 443 instaed of 80, so I changed all 80's in your example to 443. But I would assume that wouldn't change anything.
Jul
30
comment Restricting nginx website connection to VPN Users on the same server
Thanks, I think I understand, but for some reason, it didn't work. It basically fails and redirects to the last page nginx handles. Also won't this redirect all port 80 traffic on A? There are some public sites served by nginx there.
Jul
30
comment Restricting nginx website connection to VPN Users on the same server
This seemed promising, but didn't do the trick. How does this prevent a non-vpn user from accessing the user? I issued the iptables command, and it ran fine but I'm using ufw (though I think ufw is just a wrapper, so that shouldn't be a problem, right?) I also issued ufw reload after the iptables command.
Jul
30
comment Restricting nginx website connection to VPN Users on the same server
@ALex_hha It is a bit harder, I haven't any experience with managing dns servers. Maybe it could simply be a hosts entry though? How would that help in this case?
Jul
30
comment Restricting nginx website connection to VPN Users on the same server
The alternative would be to set up another machine whose sole purpose is being the VPN server that will act as a bastion, but I wanted to see if this use case can be fixed.
Jul
30
comment Restricting nginx website connection to VPN Users on the same server
Yes, server A exposes only VPN. Once you connect to it with VPN, it should expose the http server too. So, in some sense, A is both the bastion host and the target site. (Using A as a bastion to connect B works fine, which is probably the most common use case, but there is a site on A (a jenkins server) that I want to secure this way too).
Jul
30
comment Restricting nginx website connection to VPN Users on the same server
@Flup posted the routing tables before and after.
Jul
30
awarded  Editor
Jul
30
revised Restricting nginx website connection to VPN Users on the same server
added 222 characters in body