I'm using nginx to build a web server. By default, there is a folder named html, which contains an index.html and a 50.html. If we visit localhost, the index.html in the folder html will be shown.
Now I need to create my own folder containing all of my .html files. But when I configure nginx and try to visit them, I always get an 403 error.
For now I'm considering it's the problem of attributes of .html files.
I've found that the attributes of html folder contain an #, whereas my folder doesn't. I want to know what does it mean and how to add such an attribute for my own folder.
The # signifies that the file has extended permissions attributes beyond the standard U/G/O. It could be related to metadata or quarantine functionality. You can view the attributes by using the xattr command:
xattr file.jpg
You can remove the extended attributes like so:
xattr -d file.jpg
https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/xattr.1.html
Related
I'd like to change the page that shows what files I've uploaded. I never found the editable file. Can it be changed at all?? I have read a bunch article about this problem but I haven't found the solution.
I am talking about this page: Index of /--
Here is my shared folder: Location
Change the index file (probably: index.html or index.php) or add one yourself, if it does not exist yet. You can use .htaccess for example, if the directory or files inside should be access protected. You can also redirect the user when he is accessing the directory or a file inside.
The images that you have provided show the fallback display of a directory for apache.
I have a folder with bla.html file and some assets (*.png and *.json) it it.
I want doxygen to copy it into HTML documentation root.
How to make it do such thing in doxygen configuration file (not using external script)?
Upon request:
How about (from the documentation / Doxyfile):
HTML_EXTRA_FILES The HTML_EXTRA_FILES tag can be used to specify one
or more extra images or other source files which should be copied to
the HTML output directory. Note that these files will be copied to the
base HTML output directory. Use the $relpath^ marker in the
HTML_HEADER and/or HTML_FOOTER files to load these files. In the
HTML_STYLESHEET file, use the file name only. Also note that the files
will be copied as-is; there are no commands or markers available. This
tag requires that the tag GENERATE_HTML is set to YES.
The full doxygen documentation can be found at : http://doxygen.nl/manual/index.html and the referred part at: http://doxygen.nl/manual/config.html#cfg_html_extra_files
How do I grab or href a file from root folder using this method:
../../../pages/development/topic/programing.php
I am having some problems using this method, trying to link from to domain folder(root folder), so used this method.
Read more
But this doesn't work, so how do I link a file form root folder
You can directly specify the complete address in href of the destination as shown below.
Read more
or use this instead
Read more
This will also work fine.
You can only serve files that are in the Apache directory. You will need to move the file into the Apache directory or use a php script in combination with include_once:
<?php
include_once("../../../pages/development/topic/programing.php");
?>
Note that this is an insecure approach, especially if you insert variables into the string.
I have seen a few examples with link to folder but i realy don't understant what it is or how to manipulate it or get it to set the specific html page within the folder.
My website is a basic one with only CSS and HTML
it is formatted as
[file]home.html // C:/Users/user/Desktop/mywebsite/home.html
[folder]Order // C:/Users/user/Desktop/mywebsite/order/
↳[file]ordersheet.html // C:/Users/user/Desktop/mywebsite/order/ordersheet.html
I want to try set the folder path C:/Users/user/Desktop/mywebsite/order/ as the file ordersheet.html C:/Users/user/Desktop/mywebsite/order/ordersheet.html how can this be done?
To set /order to ordersheet.html change the name of ordersheet.html to index.html
The index.html is the default file that the server will serve to the visitor when he visits that specific directory.
link text
link text = what you want it to say to the user
/Users/user/Desktop/mywebsite/order/ = directory path
Keep in mind that this will only work locally. If you have it up on a server, visitors don't have access to your full C:/ drive so you have to use relative links, i.e. just /order/
If I remebember correctly, you use something like this:
<a href="file:///C:/Users/user/Desktop/mywebsite/order/ordersheet.html>link to file on harddisk</a>
If you would want to have that anchor to a folder, you would just use this:
<a href="file:///C:/Users/user/Desktop/mywebsite/order/>link to a folder on harddisk</a>
Your browser is operating directly on your system's local filesystem, so you can't.
What you have been looking at is a function of a web server (I'll use Apache HTTPD for examples here).
A typical configuration of a web server would map the local part of the URI onto a directory on the local file system and just serve up the files there if they matched the local part of the URI.
If the local part resolves to a directory (rather than a file) then it would look for a file in that directory with a name that matched a list (typically including index.html) and serve up that file.
If none of the files on the list existed, then it would generate an HTML document containing links to all the files in the directory.
Since there is no web server involved when the browser is reading the local file system directly, there is no way to map the directory onto an index file, so you would need to explicitly include the filename in the URI (or switch to using a web server).
I would like to access a local file in the immediate directory
From my understanding, you'd usually have to do something like
file://path/to/file/document.html
which requires the full path, but I would like to do something like
file://./document.html
instead, where ./ represents the current directory reference, so that I do not have to know the directory path nor make any assumptions about it.
is there any trickery like that possible with html file paths?
Use:
document.html
With no protocol specified, and no / for directories, the browser should request the asset from the same directory/folder that the current page is at.
If it's running locally (from that directory), just use ./ without the file://.
try this http://www.nt22.com/html_tutorials/022_html_path.html
using page.html and ./page.html works the same.
../ goes to a lower directory
i.e.
root/www/page.html
if you are in root/stuff/hi.html you can go to the 'www' directory by doing
../www/page.html