Code Monkey home page Code Monkey logo

nginx-resources's People

Contributors

0xb4lint avatar aokomorowski avatar davisonio avatar dekobon avatar fabiocicerchia avatar fcambus avatar friz-zy avatar m1q avatar pirogoeth avatar xxx7xxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-resources's Issues

Validate pull requests with Travis

Hello, I wrote a tool that can validate README links (valid URLs, not duplicate). It can be run when someone submits a pull request.

It is currently being used by

Examples

If you are interested, connect this repo to https://travis-ci.org/ and add a .travis.yml file to the project.

See https://github.com/dkhamsing/awesome_bot for options, more information
Feel free to leave a comment ๐Ÿ˜„

AwesomeOpenSource

We are creating a github org for all awesome open source repos. I am working with a few individuals who are also managing their own awesome repos, and I think to gain more traction we need to work together. What are your thoughts about collectively moving your awesome repos to https://github.com/AwesomeOpenSource

The idea is that visibility for these repos would be increased due to more traffic to the org. What are your thoughts? Let me know if there is anything you'd like to discuss!

Log rotation directly within Nginx configuration file: map instead of if

With this code in my server blocks (included as a snippet):

if ($time_iso8601 ~ "^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})") {}

access_log /var/log/nginx/$server_log_prefix.access.$year-$month-$day.log;

For some requests (probably something automated, probably invalid, maybe even malformed) nginx ends up with just this filename: ".access.--.log"

Depending on whether it is desired to rotate such logs (or even drop these requests or whatever), following code in http block will always give the date, and without using an "if":

map $time_iso8601 $year {
	default				'date';
	'~^(?<yyyy>\d{4})-'		$yyyy;
}
map $time_iso8601 $month {
	default				'not';
	'~^\d{4}-(?<mm>\d{2})-'		$mm;
}
map $time_iso8601 $day {
	default				'found';
	'~^\d{4}-\d{2}-(?<dd>\d{2})'	$dd;
}

Just a tip which I found no better place to tell.
Tested on nginx/1.10.3.

Docs say, the lowest required version is the same 0.9.6, and that with at least 1.11.0 it could combine all parts into one $date variable in one map expression, like this:

map $time_iso8601 $map_date {
	default							'date-not-found';
	'~^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})'	$year-$month-$day;
}

But I didn't test this.

P.S. On second thought, this particular case does not need complex capturing and this works just fine in 0.9.6 and later:

map $time_iso8601 $map_date_now {
	default				'date-not-found';
	'~^(?<ymd>\d{4}-\d{2}-\d{2})'	$ymd;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.