further tested autoindex, and i got a .css stylesheet to load from a folder outside of /www, pretty neat :)
This commit is contained in:
@@ -14,7 +14,13 @@ server {
|
||||
root ./www/;
|
||||
|
||||
location /test {
|
||||
index something.html;
|
||||
index index1.html;
|
||||
}
|
||||
|
||||
# /stylesheet/ alone doesn't work, i mean we don't have wildcards...
|
||||
location /stylesheet/style.css {
|
||||
# root ./www/../;
|
||||
root ./;
|
||||
}
|
||||
|
||||
location /test/something.html {
|
||||
@@ -28,6 +34,10 @@ server {
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
location /test/test_deeper/super_deep {
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
location /test/test_deeper/something.html {
|
||||
allow_methods DELETE;
|
||||
}
|
||||
|
||||
4
stylesheet/style.css
Normal file
4
stylesheet/style.css
Normal file
@@ -0,0 +1,4 @@
|
||||
h1 {
|
||||
color: red;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -2,9 +2,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Webserv test index</title>
|
||||
<!-- <link rel="stylesheet" href="stylesheet/style.css"> -->
|
||||
<link rel="stylesheet" href="/stylesheet/style.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align:center">Webserv Test Index</h1>
|
||||
<h1>Webserv Test Index</h1>
|
||||
<hr>
|
||||
<p style="text-align:center">(˚3˚)</p>
|
||||
</body>
|
||||
|
||||
11
www/test/test_deeper/super_deep/something.html
Normal file
11
www/test/test_deeper/super_deep/something.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Webserv test deeper Something</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align:center">Webserv Test Super Deep Something</h1>
|
||||
<hr>
|
||||
<p style="text-align:center">(˚3˚)</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user