Apache2 configuration
I activated apache2 under my Ubuntu, and it shows the Placeholder page when I give it the URL http://
However it says "The requested URL /~myusername was not found on this server." when I try http://
I tried to configure it comparing apache2.conf and associated files with my httpd.conf I used under Fedora, but it did not work.
Any hints?
-- tsf
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- T. S. Ferreira
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Thanks for the question.
I am not sure, what you are trying to do. Do you want to configure the usage of public homepages?
Thanks
Revision history for this message
|
#2 |
Yes, I have a directory /home/myusernam
files and I would like to display them.
-- tsf
On 5/19/07, Ralph Janke <email address hidden> wrote:
> Your question #6866 on Ubuntu changed:
> https:/
>
> Status: Open => Needs information
>
> Ralph Janke requested for more information:
> Thanks for the question.
>
> I am not sure, what you are trying to do. Do you want to configure the
> usage of public homepages?
>
> Thanks
>
> _______
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https:/
>
--
T. S. Ferreira
Revision history for this message
|
#3 |
You should be able to configure this by inserting
USERDIR public_html
in the httpd.conf file in /etc/apache2. Don't forget to restart the apache daemon after the change!
See also http://
Revision history for this message
|
#4 |
Under my installation there is a apache2.conf file which "Includes"
files from the subdirectory "mods-enabled". This subdirectory contains
a file clalled "userdir.conf" whose contents is:
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root
<Directory /home/*
</IfModule>
Thus the information you suggest seems to be there already!
-- tsf
On 5/19/07, Ralph Janke <email address hidden> wrote:
> Your question #6866 on Ubuntu changed:
> https:/
>
> Status: Open => Answered
>
> Ralph Janke proposed the following answer:
> You should be able to configure this by inserting
>
> USERDIR public_html
>
> in the httpd.conf file in /etc/apache2. Don't forget to restart the
> apache daemon after the change!
>
> See also http://
> and http://
>
> _______
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
--
T. S. Ferreira
Revision history for this message
|
#5 |
That look fine. In my system it also works without problems. Have you create the directory public_html in your home folder ?
Revision history for this message
|
#6 |
Yes, I did!
-- tsf
On 5/19/07, Ralph Janke <email address hidden> wrote:
> Your question #6866 on Ubuntu changed:
> https:/
>
> Status: Open => Answered
>
> Ralph Janke proposed the following answer:
> That look fine. In my system it also works without problems. Have you
> create the directory public_html in your home folder ?
>
> _______
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
--
T. S. Ferreira
Revision history for this message
|
#7 |
Could you please look in the folder /var/log/apache2/. There should be an access.log and an error.log file. Look in there (or paste them here, or try to access it again and past the last part of it here).
The information should give us a better idea what might be wrong.
Revision history for this message
|
#8 |
In access.log the last line is:
127.0.0.1 - - [20/May/
HTTP/1.1" 404 290 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.1.3) Gecko/20061201 Firefox/2.0.0.3 (Ubuntu-feisty)"
and in error.log it is:
[Sun May 20 10:13:13 2007] [error] [client 127.0.0.1] File does not
exist: /var/www/
It seems that Apache2 ignores user directories?!
-- tsf
On 5/20/07, Ralph Janke <email address hidden> wrote:
> Your question #6866 on Ubuntu changed:
> https:/
>
> Status: Open => Needs information
>
> Ralph Janke requested for more information:
> Could you please look in the folder /var/log/apache2/. There should be
> an access.log and an error.log file. Look in there (or paste them here,
> or try to access it again and past the last part of it here).
>
> The information should give us a better idea what might be wrong.
>
> _______
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https:/
>
--
T. S. Ferreira
Revision history for this message
|
#9 |
Maybe you don't have mod_userdir installed ? It is usually installed through apache2-common and is in ther directory /usr/lib/
Revision history for this message
|
#10 |
I checked: it is there! I checked again all my permissions, and they are OK.
-- tsf
On 5/20/07, Ralph Janke <email address hidden> wrote:
> Your question #6866 on Ubuntu changed:
> https:/
>
> Status: Open => Answered
>
> Ralph Janke proposed the following answer:
> Maybe you don't have mod_userdir installed ? It is usually installed
> through apache2-common and is in ther directory
> /usr/lib/
>
> _______
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
--
T. S. Ferreira
Revision history for this message
|
#11 |
Check with
lsof -a | grep mod_userdir
if the module is really loaded.
If not, try restarting the apache server.
If it is, look through your config files, maybe you have left a UserDir configuration somewhere when you tried to copy it from the fedora which interferes.
Revision history for this message
|
#12 |
In Feisty, mod_userdir is installed but disabled by default. You have to run »sudo a2enmod userdir« manually to enable it. Don't forget to restart apache afterwards.
Revision history for this message
|
#13 |
It seems to be loaded: I get a several lines answer:
apache2 5122 root mem REG 8,21 6180
8718547 /usr/lib/
apache2 5187 www-data mem REG 8,21 6180
8718547 /usr/lib/
apache2 5188 www-data mem REG 8,21 6180
8718547 /usr/lib/
apache2 5189 www-data mem REG 8,21 6180
8718547 /usr/lib/
apache2 5190 www-data mem REG 8,21 6180
8718547 /usr/lib/
apache2 5191 www-data mem REG 8,21 6180
8718547 /usr/lib/
apache2 5490 www-data mem REG 8,21 6180
8718547 /usr/lib/
BTW, lsof does not accept "-a" option. I did not copy any
configuration files from my previous installation. The only thing I
did was to put the link:
userdir.load -> ../mods-
in /etc/apache2/
-- tsf
On 5/20/07, Ralph Janke <email address hidden> wrote:
> Your question #6866 on Ubuntu changed:
> https:/
>
> Status: Open => Answered
>
> Ralph Janke proposed the following answer:
> Check with
>
> lsof -a | grep mod_userdir
>
>
> if the module is really loaded.
>
> If not, try restarting the apache server.
>
> If it is, look through your config files, maybe you have left a UserDir
> configuration somewhere when you tried to copy it from the fedora which
> interferes.
>
> _______
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
--
T. S. Ferreira
Revision history for this message
|
#14 |
If I try sudo a2enmod userdir I get:
This module is already enabled!
-- tsf
On 5/20/07, Dennis Dirdjaja <email address hidden> wrote:
> Your question #6866 on Ubuntu changed:
> https:/
>
> Dennis Dirdjaja proposed the following answer:
> In Feisty, mod_userdir is installed but disabled by default. You have to
> run »sudo a2enmod userdir« manually to enable it. Don't forget to
> restart apache afterwards.
>
> _______
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
--
T. S. Ferreira
Revision history for this message
|
#15 |
Problem solved: both files "userdir.conf" and "userdir.load" (or links) must be present in the directory mods-enabled!
-- tsf