local host and missing folders

I have built a sandbox to play web developer in, I have 3 websites and phpmyadmin in the /public_html directory but wen I brows to localhost in my browser, 2 of the websites and phpmyadmin have vanished.

I can see them in dolphin and the console but not browsing to loxalhot - this happened this morning

Also, if I create a directory in the public_html folder, it does nnt show up on ocalhost.

Does anybody know what is going on and how to fix it?

Thank you in advance for your time

OS: Linux 3.1.10-1.16-desktop x86_64
System: openSUSE 12.1 (x86_64)
KDE: 4.8.4 (4.8.4) “release 513”

AMD Phenom™ II X6 1090T Processor
Speed: 3,200.00 MHz
Cores: 5
Display Info
Vendor: ATI Technologies Inc
2D driver: fglrx
3D driver: ATI

There is normaly no directory /public_html.

The default website on an Apache2 installation on openSUSE is;

DocumentRoot "/srv/www/htdocs"

Now, it is possible to change a lot of things and to move around everything. But when you do not even show us one tiny bit of e.g. your Apache2 configuration (where it should show where your thre “websites” are), not very many people can even try to help you.

On 2012-07-22 14:06, coasterad wrote:

> Also, if I create a directory in the public_html folder, it does nnt
> show up on ocalhost.

How do you type that URL?
Have you enabled userdir in APACHE_MODULES in /etc/sysconfig/apache2?

Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I do not have any issue sharing my config file to you however, I am a linux newb and do not know which file you need nor it’s location.

If you would be so kind, I will happily post it


Reading @Carlos post, it seems that he suggests that you are not talking about serving from the system, but from a users home directory. In that case the directory you mention is NOT* /public_html*, BUT* /home/<username>/public_html.* Which is of course something completly different.

When you want to serve from users home directories, you should configure this (like Carlos says). This is not on by default because:
a) it is normaly only needed by Internet Server Providers who want to give their users the possibility of publishing web pages from their own environment;
b) it is not so good for security (this is while ISPs stop using this feature and solve this in another way).

So please explain what you are doing and what you want to achieve. And never assume that the persons you are talking to (we) did that the same way or with the same intentions. E.g. I repeat that you say that you have three web sites, but you do not explain what they are, or where they are. Nothing. And difficult to guess for others.

Oh yes, and the configuration files of Apache2 are in /etc/apache2. An important one there is default-server.conf.

On 2012-07-22 15:26, coasterad wrote:
> http://localhost/

That will not go to public_html. For that one you type:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-07-22 15:26, coasterad wrote:

> If you would be so kind, I will happily post it

Start with the file I mentioned previously (sysconfig…)

Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Am 22.07.2012 15:26, schrieb coasterad:
> http://localhost/
In your other thread
I told you that what you did does not look clean to me
(setting the document root to the users public_html)
Is the configuration still identical with what you showed in the
screenshots quoted below or did you change it?
So my guess that it works on your sandbox was simply wrong, it obviously
worked for some time and then stopped.
Revert the document root to the standard and use the supported syntax
for the user dirs in your browser, which is in your case simply


Am 19.07.2012 18:26, schrieb coasterad:
> [image: http://i3.photobucket.com/albums/y68/coasterad/mainhost3.jpg]
> [image: http://i3.photobucket.com/albums/y68/coasterad/Host3.jpg]
I had to contemplate a bit to understand which implications and
complications you might get by setting the document root to your home
public_html directory.
My guess it that it just works for you on your sandbox and you will most
probably not suffer from adverse effects.
I have some mixed feeling about that though, it does not look clean and
I would never do that on a production machine.

PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Correct, I am trying to develop websites from my /home/<username>/public_html. directory

Below are two screen shots. The first shows the server configuration as I set it up last week and as it currently is.


This screen shot shows the localhost directory with only two folders - and missing are the phpmyadmin link, which was there just an hour or two ago


And this is the dolphin view of that same directory


default-server.conf. file

# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.

DocumentRoot "/home/bilbo/public_html/"

# Configure the DocumentRoot
<Directory "/srv/www/htdocs">
                       # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs-2.2/mod/core.html#options
    # for more information.
Options None
                       # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
AllowOverride None
                       # Controls who can get stuff from this server.
Order allow,deny
 Allow from all

# Aliases: aliases can be added as needed (with no limit). The format is 
# Alias fakename realname
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL.  So "/icons" isn't aliased in this
# example, only "/icons/".  If the fakename is slash-terminated, then the 
# realname must also be slash terminated, and if the fakename omits the 
# trailing slash, the realname must also omit it.
# We include the /icons/ alias for FancyIndexed directory listings.  If you
# do not use FancyIndexing, you may comment this out.
Alias /icons/ "/usr/share/apache2/icons/"

<Directory "/usr/share/apache2/icons">
 Options Indexes MultiViews
 AllowOverride None
 Order allow,deny
 Allow from all

# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"

# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
<Directory "/srv/www/cgi-bin">
 AllowOverride None
 Options +ExecCGI -Includes
 Order allow,deny
 Allow from all

# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
# To disable it, simply remove userdir from the list of modules in APACHE_MODULES 
# in /etc/sysconfig/apache2.
<IfModule mod_userdir.c>
                       # Note that the name of the user directory ("public_html") cannot simply be
    # changed here, since it is a compile time setting. The apache package
    # would have to be rebuilt. You could work around by deleting
    # /usr/sbin/suexec, but then all scripts from the directories would be
    # executed with the UID of the webserver.
UserDir public_html
                       # The actual configuration of the directory is in
    # /etc/apache2/mod_userdir.conf.
Include /etc/apache2/mod_userdir.conf

# Include all *.conf files from /etc/apache2/conf.d/.
# This is mostly meant as a place for other RPM packages to drop in their
# configuration snippet.
# You can comment this out here if you want those bits include only in a
# certain virtual host, but not here.
Include /etc/apache2/conf.d/*.conf

# The manual... if it is installed ('?' means it won't complain)
Include /etc/apache2/conf.d/apache2-manual?conf
ServerName redrider
ServerAdmin root@redrider
UserDir enabled bilbo

yes, my “sandbox” if you wi. it has been performing flawlessly up until this morning.

I was importing databases when things started going bad -
I got a message from the sql server that it had an error because it was overloaded.
It has not been right since.

I tried to reboot the sever to no avail

So it seems that your story does not start with this thread, but has allready a history behind itself. Which you did nnot mention :frowning:

You present configuration, with the DocumentRoot pointing to a user owned directory is of course something strange that you should have mentioned. I am with Martin when he says this is not the correct way to go. You should either serve “from the system” at DocumentRoot in /srv/www/htdocs (and then manage this with an extra web-manager users from the CLI), or go for user based serving, but then in the correct way.

I cannot write to the directory /srv/www/htdocs

On 2012-07-22 16:16, coasterad wrote:
> Correct, I am trying to develop websites from my
> -/home/<username>/public_html. directory-

> Code:
> --------------------
> DocumentRoot “/home/bilbo/public_html/”
> --------------------

This is wrong. I stop helping here.

Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Also, when you say

“from the system” at DocumentRoot in /srv/www/htdocs (and then manage this with an extra web-manager users from the CLI),"

I no idea how to do that

what do you mean “This is wrong”?

On 2012-07-22 17:06, coasterad wrote:

> I cannot write to the directory /srv/www/htdocs


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I do not have the permissions to

you are not the first here not understanding how to run a web server and to handle ownership and permissions. See http://forums.opensuse.org/forums/english/get-technical-help-here/applications/476450-php-probem-setting-up-server-frontaccounting.html

Especialy post #6, where I try to explain that you should have a web manager user (as I allready stated earlier in this thread). And the importance of using the group www for that user to be able to change the contents of the web site without having to revert to the superuser (root).