Page 1 of 9 123 ... LastLast
Results 1 to 10 of 87

Thread: local host and missing folders

Hybrid View

  1. #1

    Default 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

    SYSTEM:
    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(tm) II X6 1090T Processor
    Speed: 3,200.00 MHz
    Cores: 5
    Display Info
    Vendor: ATI Technologies Inc
    Model:
    2D driver: fglrx
    3D driver: ATI

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: local host and missing folders

    There is normaly no directory /public_html.

    The default website on an Apache2 installation on openSUSE is;
    Code:
    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.
    Henk van Velden

  3. #3

    Default Re: local host and missing folders

    Quote Originally Posted by hcvv View Post
    There is normaly no directory /public_html.

    The default website on an Apache2 installation on openSUSE is;
    Code:
    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.
    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

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: local host and missing folders

    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.
    Henk van Velden

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: local host and missing folders

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

  6. #6

    Default Re: local host and missing folders

    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

    Code:
    #
    # 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
    </Directory>
    
    # 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
    </Directory>
    
    # 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
    </Directory>
    
    # 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
    </IfModule>
    
    
    # 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

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: local host and missing folders

    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)



  8. #8

    Default Re: local host and missing folders

    what do you mean "This is wrong"?

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: local host and missing folders

    On 2012-07-22 17:26, coasterad wrote:
    >
    > what do you mean "This is wrong"?


    You should not put the document root there, that's not how things are intended to work. You
    will have to solve lots of problems, and we can not compare to our installations and guess why
    yours does not work. I will not even think of it.

    Delete your installation and start fresh, putting things where they should be.

    --
    Cheers / Saludos,

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



  10. #10
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: local host and missing folders

    Am 22.07.2012 22:33, schrieb Carlos E. R.:
    > Delete your installation and start fresh, putting things where they should be.
    >

    That will not help, he can return his webserver configuration to a
    normal one by just clicking in the yast -> http server configuration and
    change the document root in the "main host" tab to /srv/www/htdocs what
    it was by default and he is done.

    Nothing I have seen in this thread until now explains in any way how
    directories and files can disappear.

    Even the most brutal misconfigured and tortured apache will never,
    absolutely NEVER delete a single file or a directory from one of the
    places configured to serve web pages or applications by it.

    The root case must be something completely different, a web app
    installed there who's installer script decided to wipe out anything else
    in the directory chosen or something else running wild.

    But nobody can ever in my life convince me that such file deletion as
    mentioned here was done by apache itself, how crappy configured it ever
    might be.

    --
    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



Page 1 of 9 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •