Apache domain to directory?

Discussion in 'Server Operation' started by badgerbox76, Jan 17, 2008.

  1. badgerbox76

    badgerbox76 Member

    Nope did not work

    Here is my default file found in /etc/apche2/sites-available/
    Code:
    NameVirtualHost *
    <VirtualHost *>
            ServerAdmin [email protected]
    
    Alias /phpmyadmin/ /usr/share/phpmyadmin
    <Directory "/usr/share/phpmyadmin">
    Options Indexes Includes FollowSymLinks Multiviews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    
            DocumentRoot /var/www/atlbricksmain
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/atlbricksmain>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all
                    # This directive allows us to have apache2's default start page
                    # in /apache2-default/, but still have / go to the right place
                    #RedirectMatch ^/$ /apache2-default/
            </Directory>
    
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
            <Directory "/usr/lib/cgi-bin">
                    AllowOverride None
                    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                    Order allow,deny
                    Allow from all
            </Directory>
    
            ErrorLog /var/log/apache2/error.log
    
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
    
            CustomLog /var/log/apache2/access.log combined
            ServerSignature On
    
        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>
    
    
    </VirtualHost>
    
    Directory permissions output

    Code:
    systemadmin@atlbricks:/var/www$ ls -la
    total 20
    drwxr-xr-x  5 root root 4096 2008-01-19 17:28 .
    drwxr-xr-x 16 root root 4096 2008-01-10 17:37 ..
    drwxr-xr-x  2 root root 4096 2008-01-10 17:37 apache2-default
    drwxr-xr-x 15 root root 4096 2008-01-24 09:40 atlbricksmain
    lrwxrwxrwx  1 root root   22 2008-01-12 19:38 phpmyadmin -> /usr/share/phpmyadmin/
    drwxr-xr-x  2 root root 4096 2008-01-21 09:12 tce
    systemadmin@atlbricks:/var/www$ cd phpmyadmin
    
     
  2. badgerbox76

    badgerbox76 Member

    the rest of the output

    Code:
    systemadmin@atlbricks:/var/www/phpmyadmin$ ls -la
    total 1016
    drwxr-xr-x   9 root root   4096 2008-01-21 13:18 .
    drwxr-xr-x 234 root root  12288 2008-01-11 02:20 ..
    -rw-r--r--   1 root root  10999 2007-07-20 09:04 browse_foreigners.php
    -rw-r--r--   1 root root    735 2007-07-20 09:04 calendar.php
    -rw-r--r--   1 root root   3434 2007-12-03 18:25 changelog.php
    -rw-r--r--   1 root root    437 2007-07-20 09:04 chk_rel.php
    -rw-r--r--   1 root root    181 2007-12-03 18:25 config.footer.inc.php
    -rw-r--r--   1 root root    181 2007-12-03 18:25 config.header.inc.php
    -rw-r--r--   1 root root   1263 2007-12-03 18:25 config.inc.php
    -rw-r--r--   1 root root   1794 2007-07-20 09:04 config.sample.inc.php
    drwxr-xr-x   2 root root   4096 2008-01-11 02:20 css
    -rw-r--r--   1 root root   1407 2007-07-20 09:04 db_create.php
    -rw-r--r--   1 root root  10642 2007-07-20 09:04 db_datadict.php
    -rw-r--r--   1 root root   2293 2007-07-20 09:04 db_export.php
    -rw-r--r--   1 root root    437 2007-07-20 09:04 db_import.php
    -rw-r--r--   1 root root  17461 2007-07-20 09:04 db_operations.php
    -rw-r--r--   1 root root   7603 2007-07-20 09:04 db_printview.php
    -rw-r--r--   1 root root  34636 2007-07-20 09:04 db_qbe.php
    -rw-r--r--   1 root root  11925 2007-07-20 09:04 db_search.php
    -rw-r--r--   1 root root    747 2007-07-20 09:04 db_sql.php
    -rw-r--r--   1 root root  21346 2007-07-20 09:04 db_structure.php
    lrwxrwxrwx   1 root root     26 2008-01-11 02:21 docs.css -> ../doc/phpmyadmin/docs.css
    lrwxrwxrwx   1 root root     36 2008-01-11 02:21 Documentation.html -> ../doc/phpmyadmin/Documentation.html
    -rw-r--r--   1 root root   1959 2007-07-20 09:04 error.php
    -rw-r--r--   1 root root  24147 2007-07-20 09:04 export.php
    -rw-r--r--   1 root root  18902 2007-07-20 09:04 favicon.ico
    -rw-r--r--   1 root root   4829 2008-01-21 09:08 htaccess.txt
    -rw-r--r--   1 root root  14105 2007-07-20 09:04 import.php
    -rw-r--r--   1 root root   6265 2007-07-20 09:04 index.php
    drwxr-xr-x   2 root root   4096 2008-01-11 02:20 js
    drwxr-xr-x   2 root root   4096 2008-01-11 02:20 lang
    drwxr-xr-x  11 root root   4096 2008-01-11 02:20 libraries
    -rw-r--r--   1 root root    343 2007-12-03 18:25 license.php
    -rw-r--r--   1 root root  15048 2007-07-20 09:04 main.php
    -rw-r--r--   1 root root  22230 2007-07-20 09:04 navigation.php
    -rw-r--r--   1 root root  27242 2007-07-20 09:04 pdf_pages.php
    -rw-r--r--   1 root root  52706 2007-07-20 09:04 pdf_schema.php
    -rw-r--r--   1 root root    341 2007-07-20 09:04 phpinfo.php
    lrwxrwxrwx   1 root root     22 2008-01-21 13:18 phpmyadmin -> /usr/share/phpmyadmin/
    drwxr-xr-x   5 root root   4096 2008-01-11 02:20 pmd
    -rw-r--r--   1 root root   8962 2007-07-20 09:04 pmd_common.php
    -rw-r--r--   1 root root   1857 2007-07-20 09:04 pmd_display_field.php
    -rw-r--r--   1 root root  16979 2007-07-20 09:04 pmd_general.php
    -rw-r--r--   1 root root    808 2007-07-20 09:04 pmd_help.php
    -rw-r--r--   1 root root   3340 2007-07-20 09:04 pmd_pdf.php
    -rw-r--r--   1 root root   3878 2007-07-20 09:04 pmd_relation_new.php
    -rw-r--r--   1 root root   1794 2007-07-20 09:04 pmd_relation_upd.php
    -rw-r--r--   1 root root   2194 2007-07-20 09:04 pmd_save_pos.php
    -rw-r--r--   1 root root  13573 2007-07-20 09:04 querywindow.php
    -rw-r--r--   1 root root    308 2007-07-20 09:04 readme.php
    drwxr-xr-x   2 root root   4096 2008-01-11 02:20 scripts
    -rw-r--r--   1 root root   3341 2007-07-20 09:04 server_binlog.php
    -rw-r--r--   1 root root   2773 2007-07-20 09:04 server_collations.php
    -rw-r--r--   1 root root  16026 2007-07-20 09:04 server_databases.php
    -rw-r--r--   1 root root   8285 2007-07-20 09:04 server_engines.php
    -rw-r--r--   1 root root   1622 2007-07-20 09:04 server_export.php
    -rw-r--r--   1 root root    452 2007-07-20 09:04 server_import.php
    -rw-r--r--   1 root root 113092 2007-07-20 09:04 server_privileges.php
    -rw-r--r--   1 root root   2845 2007-07-20 09:04 server_processlist.php
    -rw-r--r--   1 root root    543 2007-07-20 09:04 server_sql.php
    -rw-r--r--   1 root root  21158 2007-12-03 18:25 server_status.php
    -rw-r--r--   1 root root   2429 2007-07-20 09:04 server_variables.php
    -rw-r--r--   1 root root    283 2007-07-20 09:04 show_config_errors.php
    -rw-r--r--   1 root root  31592 2007-07-20 09:04 sql.php
    -rw-r--r--   1 root root   9077 2007-07-20 09:04 tbl_addfield.php
    -rw-r--r--   1 root root   9451 2007-07-20 09:04 tbl_alter.php
    -rw-r--r--   1 root root  45058 2007-07-20 09:04 tbl_change.php
    -rw-r--r--   1 root root   9092 2007-07-20 09:04 tbl_create.php
    -rw-r--r--   1 root root   3885 2007-07-20 09:04 tbl_export.php
    -rw-r--r--   1 root root    602 2007-07-20 09:04 tbl_import.php
    -rw-r--r--   1 root root  16503 2007-07-20 09:04 tbl_indexes.php
    -rw-r--r--   1 root root   1988 2007-07-20 09:04 tbl_move_copy.php
    -rw-r--r--   1 root root  19240 2007-07-20 09:04 tbl_operations.php
    -rw-r--r--   1 root root  18341 2007-07-20 09:04 tbl_printview.php
    -rw-r--r--   1 root root  24284 2007-07-20 09:04 tbl_relation.php
    -rw-r--r--   1 root root  12728 2007-07-20 09:04 tbl_replace.php
    -rw-r--r--   1 root root   4622 2007-07-20 09:04 tbl_row_action.php
    -rw-r--r--   1 root root  17954 2007-07-20 09:04 tbl_select.php
    -rw-r--r--   1 root root    731 2007-07-20 09:04 tbl_sql.php
    -rw-r--r--   1 root root  33764 2007-07-20 09:04 tbl_structure.php
    drwxr-xr-x   4 root root   4096 2008-01-11 02:21 themes
    -rw-r--r--   1 root root    974 2007-07-20 09:04 themes.php
    -rw-r--r--   1 root root   1727 2007-07-20 09:04 transformation_overview.php
    -rw-r--r--   1 root root   4049 2007-07-20 09:04 transformation_wrapper.php
    lrwxrwxrwx   1 root root     34 2008-01-11 02:21 translators.html -> ../doc/phpmyadmin/translators.html
    -rw-r--r--   1 root root   5587 2007-07-20 09:04 user_password.php
    systemadmin@atlbricks:/var/www/phpmyadmin$ cd ..
    systemadmin@atlbricks:/var/www$ ls
    apache2-default  atlbricksmain  phpmyadmin  tce
    systemadmin@atlbricks:/var/www$ cd atlbricksmain
    systemadmin@atlbricks:/var/www/atlbricksmain$ ls -la
    total 268
    drwxr-xr-x 15 root root   4096 2008-01-24 09:40 .
    drwxr-xr-x  5 root root   4096 2008-01-19 17:28 ..
    drwxr-xr-x  9 root root   4096 2008-01-13 15:25 administrator
    drwxr-xr-x  2 root root   4096 2008-01-13 15:25 cache
    -rw-r--r--  1 root root 101854 2007-07-21 05:29 CHANGELOG.php
    drwxr-xr-x 16 root root   4096 2008-01-13 15:25 components
    -rw-r--r--  1 root root   4513 2008-01-16 22:29 configuration.php
    -rw-r--r--  1 root root   3429 2007-07-21 05:29 COPYRIGHT.php
    drwxr-xr-x  2 root root   4096 2008-01-13 15:25 editor
    -rw-r--r--  1 root root   3745 2007-07-21 05:29 globals.php
    drwxr-xr-x  3 root root  12288 2008-01-13 15:25 help
    -rw-r--r--  1 root root   4829 2007-07-21 05:29 htaccess.txt
    drwxr-xr-x  6 root root   4096 2008-01-13 15:25 images
    drwxr-xr-x 10 root root   4096 2008-01-13 15:25 includes
    -rw-r--r--  1 root root   5223 2007-07-21 05:29 index2.php
    -rw-r--r--  1 root root   8491 2007-07-21 05:29 index.php
    -rw-r--r--  1 root root   4376 2007-07-21 05:29 INSTALL.php
    drwxr-xr-x  2 root root   4096 2008-01-13 15:25 language
    -rw-r--r--  1 root root  17977 2007-07-21 05:29 LICENSE.php
    -rw-r--r--  1 root root    710 2007-07-21 05:29 mainbody.php
    drwxr-xr-x  7 root root   4096 2008-01-13 15:25 mambots
    drwxr-xr-x  2 root root   4096 2008-01-13 15:25 media
    drwxr-xr-x  2 root root   4096 2008-01-13 15:25 modules
    -rw-r--r--  1 root root   2474 2007-07-21 05:29 offlinebar.php
    -rw-r--r--  1 root root   4929 2007-07-21 05:29 offline.php
    -rw-r--r--  1 root root    709 2007-07-21 05:29 pathway.php
    drwxr-xr-x  9 root root   4096 2008-01-21 13:18 phpmyadmin
    -rw-r--r--  1 root root    286 2007-07-21 05:29 robots.txt
    drwxr-xr-x  5 root root   4096 2008-01-13 15:25 templates
    systemadmin@atlbricks:/var/www/atlbricksmain$ cd ..
    systemadmin@atlbricks:/var/www$ cd tce
    systemadmin@atlbricks:/var/www/tce$ ls -la
    total 64544
    drwxr-xr-x 2 root root     4096 2008-01-21 09:12 .
    drwxr-xr-x 5 root root     4096 2008-01-19 17:28 ..
    -rw-r--r-- 1 root root     4830 2008-01-21 09:09 .htaccess
    -rw-r--r-- 1 root root 32975587 2008-01-20 04:40 maps.zip
    -rw-r--r-- 1 root root  1827868 2007-01-29 18:14 obj_dustlike2-rmk2.pk3
    -rw-r--r-- 1 root root  8721229 2007-05-27 10:40 obj_frostbite.pk3
    -rw-r--r-- 1 root root   844023 2007-05-27 10:40 obj_mukasi_z.pk3
    -rw-r--r-- 1 root root  1516639 2007-05-27 10:41 obj_slums-wip.pk3
    -rw-r--r-- 1 root root  5912926 2007-05-27 10:42 obj_suburban_a3.pk3
    -rw-r--r-- 1 root root  6657673 2007-05-27 10:42 obj_villa2.pk3
    -rw-r--r-- 1 root root     2071 2007-01-02 14:42 yyy_frostbite-allweapons.pk3
    -rw-r--r-- 1 root root  7486244 2007-01-05 12:06 zzz_soundofmilk_v666.pk3
    -rw-r--r-- 1 root root     5856 2007-05-27 10:42 zzzz_allweapons.pk3
    systemadmin@atlbricks:/var/www/tce$
     
  3. badgerbox76

    badgerbox76 Member

    Sorry this thread has been taking so long but I still don't see whats going wrong. I don't know if setting up a user account and letting you in would help but let me know. I trust that you would not go crazy and mess anything up more then it already is. :p
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Can you comment out these sections in your vhost configuration?
    Code:
    Alias /phpmyadmin/ /usr/share/phpmyadmin
    <Directory "/usr/share/phpmyadmin">
    Options Indexes Includes FollowSymLinks Multiviews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    and


    Code:
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
     
  5. badgerbox76

    badgerbox76 Member

    German ingenuity ftw! :p Thank you a million!!@$!@$! :D :D

    That did

    as you can see http://www.atlbricks.com/phpmyadmin/

    This is my final question in this thread. What do I need to add to the vhost in order for apache to list and allow downloads of all the files in /var/www/tce or http://www.atlbricks.com/
     
    Last edited: Jan 26, 2008
  6. falko

    falko Super Moderator Howtoforge Staff

    The Indexes option is already set for /var/www/atlbricksmain, so you'd have to rename your index file (index.html, index.php, etc.) in /var/www/atlbricksmain to something else (e.g. index_old.html); afterwards you should see all the files in /var/www/atlbricksmain.
     
  7. badgerbox76

    badgerbox76 Member

    Sorry I did not expain myself correctly. Joomla and phpmyadmin are both running at working great thanks to your help. But I have another directory I need fixed, /var/www/tce or http://www.atlbricks.com/tce I need to be able to see and download this files but when I hit that address I get the 404 error. How can I setup the server to list all those files?
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Create a symlink from /var/www/atlbricksmain/tce to /var/www/tce.
     

Share This Page