/    Sign up×
Community /Pin to ProfileBookmark

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:

[LIST]

  • [*]

    tmp


  • [*]

    html


  • [*]

    logs


  • [*]

    stats


  • [*]

    _sitedata


  • [*]

    www


  • [*]

    var


  • [*]

    usr


  • [*]

    sbin


  • [*]

    root


  • [*]

    private


  • [*]

    lib


  • [*]

    etc


  • [*]

    dev


  • [*]

    bin


  • [/LIST]

    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.

    to post a comment
    PHP

    4 Comments(s)

    Copy linkTweet thisAlerts:
    @MindzaiMar 06.2010 — 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):

    $ 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.
    Copy linkTweet thisAlerts:
    @sshelatoauthorMar 06.2010 — 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):

    $ 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.[/QUOTE]


    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?
    Copy linkTweet thisAlerts:
    @MindzaiMar 06.2010 — 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!
    Copy linkTweet thisAlerts:
    @sshelatoauthorMar 06.2010 — 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.
    ×

    Success!

    Help @sshelato spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.19,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...