Go Back   DaemonForums > OpenBSD > OpenBSD General

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 11th March 2018
toprank toprank is offline
Fdisk Soldier
Join Date: Feb 2018
Posts: 52
Default httpd.conf serving /location requests

I'm having some difficulty switching completely to OpenBSD httpd, and getting my httpd.conf correctly serving domain.tld/app requests from its location.

The PHP app resides in /var/www/app but domain.tld/app requests return a 404 not found error.

This is my full httpd.conf. I've tried a number of different syntaxes for this but have only been successful when creating a new server "app.domain.tld" serving requests from root "/var/www/app", but would prefer being able to reach this app at /app.

server "domain.tld" {
        alias www.domain.tld
        listen on * port 80
        listen on * tls port 443
        directory index index.php
        tls {
                key "/etc/ssl/private/domain.tld.key"
                certificate "/etc/ssl/domain.tld.fullchain.pem"

        connection max request body 5000000000

        location "/*.php*" {
                fastcgi socket "/run/php-fpm.sock"

        location "/app*" {
                root "/app"

        location "/.well-known/acme-challenge/*" {
                root "/acme"
                root strip 2 

server "cloud.domain.tld" {
        listen on * tls port 443
        root "/cloud/"
        directory index index.php
        tls {
                key "/etc/ssl/private/domain.tld.key"
                certificate "/etc/ssl/domain.tld.fullchain.pem"

        location "/db_structure.xml" { block }
        location "/.ht*"             { block }
        location "/README"           { block }
        location "/data*"            { block }
        location "/config*"          { block }

        location "/*.php*" {
                fastcgi socket "/run/php-fpm.sock"
Reply With Quote

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
www/nextcloud and httpd.conf subdomain config toprank OpenBSD Packages and Ports 31 2nd March 2018 10:50 AM
httpd rc.conf.local question psypro OpenBSD General 3 30th October 2016 05:54 PM
httpd.conf chroot morophla OpenBSD General 4 19th April 2015 02:07 PM
Update httpd.conf IPs from DNS zones. bigb89 Programming 16 2nd December 2008 02:02 AM
httpd.conf Snoop1990 General software and network 5 29th July 2008 04:30 AM

All times are GMT. The time now is 01:01 AM.

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