www.webdeveloper.com
Results 1 to 5 of 5

Thread: PHP on a Linux System?

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    Greenville, SC
    Posts
    3

    PHP on a Linux System?

    I'm new to web development (and to this forum), and I'm having some trouble.

    I was asked to help out with a friend's corporate website. When I took a look at things with my FTP program, I found a bunch of folders with unfamiliar names. Because I've always done development on less-sophisticated systems, I have no idea what I'm looking at and how it will affect any PHP code I write.

    The folders are:
    • tmp
    • html
    • logs
    • stats
    • _sitedata
    • www
    • var
    • usr
    • sbin
    • root
    • private
    • lib
    • etc
    • dev
    • bin


    If y'all could just point me in the right direction or to some helpful literature, I'd love to learn more about what I'm looking at.

  2. #2
    Join Date
    Nov 2008
    Posts
    2,477
    You aren't looking at anything magical, just a list of directories. This explains what some of the common directories are normally used for, but this can vary from system to system. Generally if you are doing web development you are only really interested in apache/php/mysql config files (normally located in /etc but sometimes in /usr) and the DocumentRoot directories of each virtualhost (usually specified in the main apache httpd.conf file though again it varies - debian in particular uses their own apache config system) - these are likely to be in www. The best thing you can do is track down the apache config and have a read to see how things are configured. You can find the fine by running the following if you don't know where it is (you probably need to be root un updatedb):

    Code:
    $ updatedb
    $locate httpd.conf
    You may also find that as you're connecting via FTP what you're seeing is just a user's home directory in which case it is easier still, just browse through and see what's in each directory, there are no rules as to what is where.
    The first rule of Tautology Club is the first rule of Tautology Club.

  3. #3
    Join Date
    Feb 2010
    Location
    Greenville, SC
    Posts
    3
    Quote Originally Posted by Mindzai View Post
    You aren't looking at anything magical, just a list of directories. This explains what some of the common directories are normally used for, but this can vary from system to system. Generally if you are doing web development you are only really interested in apache/php/mysql config files (normally located in /etc but sometimes in /usr) and the DocumentRoot directories of each virtualhost (usually specified in the main apache httpd.conf file though again it varies - debian in particular uses their own apache config system) - these are likely to be in www. The best thing you can do is track down the apache config and have a read to see how things are configured. You can find the fine by running the following if you don't know where it is (you probably need to be root un updatedb):

    Code:
    $ updatedb
    $locate httpd.conf
    You may also find that as you're connecting via FTP what you're seeing is just a user's home directory in which case it is easier still, just browse through and see what's in each directory, there are no rules as to what is where.
    Thank you very much for your thoughtful response! As a follow-up, why would someone choose this kind of configuration for hosting a website over the typical ISP-provided setup with an Admin Panel and a single root folder?

  4. #4
    Join Date
    Nov 2008
    Posts
    2,477
    It doesn't seem like an untypical (is that a word?) set up to me, it's probably just that you are used to doing things via cPanel or similar which is a web front end and masks the specifics of the server from you. Most web servers run some variant of unix and most variants of unix use a directory structure like this. As for why someone would choose a particular set up, that's a question only they can answer!
    The first rule of Tautology Club is the first rule of Tautology Club.

  5. #5
    Join Date
    Feb 2010
    Location
    Greenville, SC
    Posts
    3
    Thanks again. It seems I've stumbled into the wild world of dedicated hosting. I'll advise them to find someone who's a qualified linux administrator. In the meantime, I've got a lot of reading to do.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles