The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
2answers
215 views

Redirect to 404 if filename passed as parameter does not exitsts

I have special parameter data=/path/to/filename.htm in uri. Its old and rusty site builded on SSI, and I can't modify it. Problem is when filename passed as arg_data not exists, page is broken. I ...
-1
votes
2answers
120 views

Try the command multiple times [closed]

I need to execute a command and also check if it was successful. If there was an error, I should try again and the following code is working as expected. But what if I need to try the same command 3 ...
1
vote
1answer
416 views

nginx don't log requests of a specific ip adress

I'm trying to don't log requests made from a specific ip address like this: location = / { index index.php; if ( $remote_addr = "spe.ci.fic.ip" ) { access_log off; } } But ...
2
votes
1answer
2k views

How do I check if a user exists in puppet?

I already found some examples where I can check if a variable has a specific value if $var == 'somevalue' { ... } of if something is defined if defined(Package['somepackage']) { ... } ...
1
vote
2answers
1k views

NGINX Reverse Proxy : proxy_cache inside if block - Possible?

I think starting with a small snippet would be wisest: location ^~ /test/ { proxy_pass http://frontend; proxy_http_version 1.1; ...
0
votes
1answer
1k views

Syntax error near unexpected token `fi'

I have been trying to write a while loop bash script that will check the size of two directories, and echo that out to a text file in the www folder. After my while loop stubbornly refused to work, I ...
4
votes
1answer
4k views

If directive not working in apache VirtualHost conf, says “Invalid command”

Why?? <VirtualHost *:80> ServerAdmin admin@mydomain.com DirectoryIndex index.php <If "%{SERVER_PROTOCOL} != 'HTTPS'"> Redirect / ...
0
votes
1answer
921 views

Nginx upstream based on remote_addr

Do you have any idea if there is any easier solution to pass the requests to different upstreams based on the visitor's ip address? The only solution that I found at the moment is: upstream live { ...