Or ngx_http_office_hours_filter_module for short, it's a module for nginx that lets you specify a schedule and only serve content during that time.
You can install it from source:
./configure --add-dynamic-module=/path/to/ngx_http_office_hours_filter_module make sudo make install
=> [1] Compiling And Installing NGINX from Source
The office_hours directive expects a list of time ranges separated by spaces in the format: "HH:mm-HH:mm". The hours should be in 24 hour format, and the minutes are optional. The word "closed" can be used to indicate that the server is not operating on that day.
The first range will be used as the default value, and the rest will be read from right to left, starting with sunday.
When the current time is within those hours, the server will operate as usual, otherwise it will return a 403 with a page showing the operating hours of the service. See this example for a page that's always closed[2]
=> [2] A page that is never open.
Don't use this directive.
location / { office_hours 8:30-19; }
location / { office_hours 8:30-19 closed; }
location / { office_hours 8:30-19 10-16 closed; }
location / { office_hours 8:30-19 closed 8:30-19 10-16 10-16; }
Uninstall nginx.
With this directive you can specify additional information for when the server is closed, such as contact information or alternate locations for the data. It accepts a text containing HTML that will be injected to the body of the office hours page.
location / { office_hours_additional_information "Additional Information>
Please do not email us asking to open the website 24/7. Send all complaints to friendship.quest/@ruben
" }
text/gemini; lang=en
This content has been proxied by September (3851b).