This is the tutorial I was using last night:
( I do notice, it is a little "old", I am using OpenBsd 6.1, don't know if that is why
it would not work for me)
https://www.rootbsd.net/kb/339/Insta...penBSD-59.html
This is the code, it says to add to my httpd.conf:
Quote:
Create and edit /etc/httpd.conf if it doesn't already exist and add the following code:
|
Code:
server "default" {
listen on egress port 80
}
types {
text/css css
text/html html htm
text/txt txt
image/gif gif
image/jpeg jpeg jpg
image/png png
application/javascript js
application/xml xml
}
at the end of the tutorial, it also says to add this:
Quote:
Set index.php as the default index page by adding this under the above code, ensuring it is still inside the "default" server block:
|
Code:
directory {
index "index.php"
}
========================
My actual httpd.conf file, and it works fine for just regular html, (index.html)
Code:
# $OpenBSD: httpd.conf,v 1.16 2016/09/17 20:05:59 tj Exp $
#
# Macros
#
ext_addr="*"
#
# Global Options
#
# prefork 3
#
# Servers
#
# A minimal default server
server "default" {
listen on $ext_addr port 80
}
### This is where I added to code from the tutorial
### Then the additional
#directory {
# index "index.php"
#}
# Of course I did not have the # comment symbols, in the actual code, the lines were not
#commented out.
# Include MIME types instead of the built-in ones
types {
include "/usr/share/misc/mime.types"
}
Just to clarify, this is what I had, but when I restart httpd, it fails, with no error message,
other then "failed".
Code:
# $OpenBSD: httpd.conf,v 1.16 2016/09/17 20:05:59 tj Exp $
#
# Macros
#
ext_addr="*"
#
# Global Options
#
# prefork 3
#
# Servers
#
# A minimal default server
server "default" {
listen on $ext_addr port 80
}
server "default" {
listen on egress port 80
}
types {
text/css css
text/html html htm
text/txt txt
image/gif gif
image/jpeg jpeg jpg
image/png png
application/javascript js
application/xml xml
}
directory {
index "index.php"
}
# Include MIME types instead of the built-in ones
types {
include "/usr/share/misc/mime.types"
}
Thanks