My DocumentRoot is here:
# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/www/html"
My Aliases look like this:
# Alias /icons/ "/var/www/icons/" Alias /public_html "/home/user_name/public_html" #
What is wrong with the second Alias line above?
# # 05/23/05: This is now provided via a separate package called httpd-manual # which comes with an own manual alias Alias /manual "/var/www/manual"
I want to be able to have one or two of my files in /var/www/html and the rest of them in /home/user_name/public_html
Will this work with Alias or symbolic links?
I have tried both and neither works for me.
On Tuesday 06 March 2007, linuxmaillists@charter.net wrote:
My DocumentRoot is here:
# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/www/html"
My Aliases look like this:
# Alias /icons/ "/var/www/icons/" Alias /public_html "/home/user_name/public_html" #
What is wrong with the second Alias line above?
# # 05/23/05: This is now provided via a separate package called httpd-manual # which comes with an own manual alias Alias /manual "/var/www/manual"
I want to be able to have one or two of my files in /var/www/html and the rest of them in /home/user_name/public_html
Will this work with Alias or symbolic links?
I have tried both and neither works for me.
I have read this several times and it just is not working for me.
http://httpd.apache.org/docs/2.2/howto/public_html.html http://httpd.apache.org/docs/2.2/mod/mod_userdir.html#userdir http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
The text below came from the Apache manual on my local box
The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot. URLs with a (%-decoded) path beginning with url-path will be mapped to local files beginning with directory-path.
What does the second sentence above mean?
# cd /; ln -s / public_html Accessing http://localhost/~root/
This would allow clients to walk through the entire filesystem.
Will some be kind enough to explain how this would work? This appears to be what I am trying to do with my user directory but it isn't working.
On Tue, 2007-03-06 at 03:59 -0500, linuxmaillists@charter.net wrote:
I have read this several times and it just is not working for me.
http://httpd.apache.org/docs/2.2/howto/public_html.html http://httpd.apache.org/docs/2.2/mod/mod_userdir.html#userdir http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
The text below came from the Apache manual on my local box
The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot. URLs with a (%-decoded) path beginning with url-path will be mapped to local files beginning with directory-path.
What does the second sentence above mean?
It might help if you gave us the URI for where that sentence came from, but it sounds like one of the techniques used for mass virtual hosting without lots of individual configurations per host. Apache can take the domain name of the request, and use it as the root document directory for that domain.
e.g. It could map requests for http://example.com/something.html and http://example.net/else.html to get their files from "/var/www/example.com/something.html" and "/var/www/example.net/else.html"
# cd /; ln -s / public_html Accessing http://localhost/~root/
This would allow clients to walk through the entire filesystem.
Not a good idea of something to try. Though "~/root" would try to use the root user's homespace, which isn't / but /root. And that sort of thing probably won't work as you'd expect if you have SELinux enabled, as HTML serveable files have to have the right contexts.
It might help if you give a good description of what you're wanting to do.
On Tue, 2007-03-06 at 01:59 -0500, linuxmaillists@charter.net wrote:
My DocumentRoot is here:
DocumentRoot "/var/www/html"
The usual place.
My Aliases look like this:
Alias /icons/ "/var/www/icons/" Alias /public_html "/home/user_name/public_html"
If you're using the userdirs feature, you don't need to mess with aliasing it.
i.e. http://localhost/~tim/ refers to /home/tim/public_html/
For that to work, /home/ and /home/tim/ needs to be world executable. And, /home/tim/public_html/ needs to be world executable and readable, likewise any files to be served in there need to be world readable. These are the permissions applied to "other" users.
Also, you may need to change SELinux settings or contexts for those files.
I want to be able to have one or two of my files in /var/www/html and the rest of them in /home/user_name/public_html
Will this work with Alias or symbolic links?
You can use aliases, or the userdir direcctive.
On Tue, March 6, 2007 07:59, linuxmaillists@charter.net wrote:
My DocumentRoot is here:
# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/www/html"
My Aliases look like this:
# Alias /icons/ "/var/www/icons/" Alias /public_html "/home/user_name/public_html" #
What is wrong with the second Alias line above?
# # 05/23/05: This is now provided via a separate package called httpd-manual # which comes with an own manual alias Alias /manual "/var/www/manual"
I want to be able to have one or two of my files in /var/www/html and the rest of them in /home/user_name/public_html
Will this work with Alias or symbolic links?
I have tried both and neither works for me.
Hi If you want to use the user's public html path you have to set it up first.
This configuration could do the trick:
UserDir public_html
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> Order deny,allow Deny from all </Limit> </Directory>
Then www.example.com/~user/ should work properly Hope this helps, all the best. Manuel.
Well I had it working very nicely but it stopped write after doing an update.
This is how I set up httpd.conf
<IfModule mod_userdir.c> # # UserDir is disabled by default since it can confirm the presence # of a username on the system (depending on home directory # permissions). # UserDir "disable" # # To enable requests to /~user/ to serve the user's public_html # directory, use this directive instead of "UserDir disable": # UserDir public_html </IfModule>
It would open with this in the address bar http://localhost/public_html/ and show my files. now it has a 404 not found error
Here are the files that were updated
Mar 06 05:32:46 Updated: nss.i386 3.11.5-0.6.1.fc6 Mar 06 05:32:55 Updated: evolution-data-server.i386 1.8.3-2.fc6 Mar 06 05:33:06 Updated: docbook-style-xsl.noarch 1.72.0-1.fc6 Mar 06 05:33:07 Updated: nss-devel.i386 3.11.5-0.6.1.fc6 Mar 06 05:33:07 Erased: evolution-data-server-devel Mar 06 05:33:11 Updated: evolution-data-server-devel.i386 1.8.3-2.fc6 Mar 06 05:33:12 Updated: nss-tools.i386 3.11.5-0.6.1.fc6 Mar 06 05:33:20 Updated: phpMyAdmin.noarch 2.10.0.2-1.fc6 Mar 06 05:33:23 Updated: kernel-headers.i386 2.6.19-1.2911.6.5.fc6 Mar 06 05:33:41 Installed: kernel-devel.i686 2.6.19-1.2911.6.5.fc6 Mar 06 05:33:58 Installed: kernel.i686 2.6.19-1.2911.6.5.fc6
Could any of them have changed something to cause Apache to stop finding my home directory?
I have no clue what to look for now.
On Tue, 2007-03-06 at 07:33 -0500, linuxmaillists@charter.net wrote:
Well I had it working very nicely but it stopped write after doing an update.
This is how I set up httpd.conf
<IfModule mod_userdir.c> # # UserDir is disabled by default since it can confirm the presence # of a username on the system (depending on home directory # permissions). # UserDir "disable" # # To enable requests to /~user/ to serve the user's public_html # directory, use this directive instead of "UserDir disable": # UserDir public_html </IfModule>
It would open with this in the address bar http://localhost/public_html/ and show my files. now it has a 404 not found error
Which technique did you use? Userdirs, or a custom alias? Above looks like you used the second. But you haven't shown us anything else that you've changed for your customisations, this time. It might be worth posting the whole config file, without anything private included. By the way, if you're disabling userdirs, write disable without the quotes around it.
If you used userdirs, then your URL should be along the lines of http://example.com/~username/. But if you'd made an alias, then you'd use something like http://example.com/aliasname/.
After those updates, which I don't know if any would be a cause, check your config file is still the same as you expect.
On Tuesday 06 March 2007, Tim wrote:
On Tue, 2007-03-06 at 07:33 -0500,
linuxmaillists@charter.net wrote:
Well I had it working very nicely but it stopped write after doing an update.
This is how I set up httpd.conf
<IfModule mod_userdir.c> # # UserDir is disabled by default since it can confirm the presence # of a username on the system (depending on home directory # permissions). # UserDir "disable" # # To enable requests to /~user/ to serve the user's public_html # directory, use this directive instead of "UserDir disable": # UserDir public_html </IfModule>
It would open with this in the address bar http://localhost/public_html/ and show my files. now it has a 404 not found error
Which technique did you use? Userdirs, or a custom alias? Above looks like you used the second. But you haven't shown us anything else that you've changed for your customisations, this time. It might be worth posting the whole config file, without anything private included. By the way, if you're disabling userdirs, write disable without the quotes around it.
If you used userdirs, then your URL should be along the lines of http://example.com/~username/. But if you'd made an alias, then you'd use something like http://example.com/aliasname/.
It turns out this is what I was using and when I put it back in this condition it started working again.
Alias /public_html "/home/user_name/public_html"
I had commited it out thinking UsrDir public_html was what was working.
Maybe I will play around later and see if I can figure out how to make the UsrDir public_html work.