DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th March 2015
22decembre 22decembre is offline
Port Guard
 
Join Date: Dec 2014
Posts: 42
Default httpd features ?

Hello

So I am trying to figure out how to switch my website to the new openbsd httpd.

Honnestly, this is great ! I have a sane and minimalist base.

But I am missing some good thing from nginx and wonder if I can get them.

I like nginx redirections ! Maybe they can be set even better...

Someone knows how to make them ?

Code:
location ~* ^/([0-9]+)/([0-9]+)/([0-9]+)/(.+)/$ {
	try_files $uri $uri/ /$1/$2/$3/;
	}
Good would be to redirect (in case of folders) to the parent folders. I would love this !

What about the error page also ? In nginx with have this :

Code:
error_page 404 /404.html;
location  /404.html {
  internal;
}
Reply With Quote
  #2   (View Single Post)  
Old 28th March 2015
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Have you bothered to read man pages for httpd.conf and check /etc/examples/httpd.conf

Code:
predrag@oko$ uname -a
OpenBSD oko.bagdala2.net 5.7 GENERIC.MP#881 amd64
Quote:
block [return code [uri]]
Close the connection and send an error page. If the optional
return code is not specified, httpd(8) denies access with a `403
Forbidden' response. The optional uri argument can be used with
return codes in the 3xx range to send a `Location:' header for
redirection to a specified URI.

The url may contain predefined macros that will be expanded at
runtime:
I am not quite following your first example. What are you trying to accomplish with those regular expressions?
Reply With Quote
  #3   (View Single Post)  
Old 28th March 2015
22decembre 22decembre is offline
Port Guard
 
Join Date: Dec 2014
Posts: 42
Default

yes, I have checked the man page. This is why I don't ask you about php : I have already succeed with php running !

These regular expressions are from nginx config'.

What I want to do do is to go through the url in that way :

http://www.server.tld/year/month/day/article/index.html

If the article name is wrong, then go to the day folder, if the day folder is wrong go to the month, then to the year...
Reply With Quote
  #4   (View Single Post)  
Old 28th March 2015
22decembre 22decembre is offline
Port Guard
 
Join Date: Dec 2014
Posts: 42
Default

Apparently, it's somewhere on the todo list…

https://github.com/reyk/httpd/issues/27
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what missing features do you think *BSD should provide ? daemonfowl Other OS 21 22nd April 2013 08:03 AM
PHP 5.4.0 brings new features J65nko News 0 3rd March 2012 09:41 AM
Security Joomla! 2.5 adds new features, closes holes J65nko News 0 24th January 2012 10:54 PM
How add additional features on xterm ( Xfce ) ? aleunix OpenBSD Packages and Ports 4 5th June 2008 02:18 PM


All times are GMT. The time now is 08:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick