Results 1 to 7 of 7

Thread: Running Contao on a LAMP

  1. #1
    User
    Join Date
    08-09-09.
    Location
    Zwolle, The Netherlands
    Posts
    73

    Default Running Contao on a LAMP

    I have always developed my Contao websites on a WAMP server under XP Pro. When the site is done, I transfer it to the live server, which is a LAMP installation.
    Now, sort of out of curiosity, I've begun to run Ubuntu Linux on my desktop instead of XP Pro and am wondering if I can develop my websites with it. I installed a LAMP, but when I run the contao-check.php file, there are two problems. It says the directory contao-check.php has created is owned by me, at least my Ubuntu login name, but should be owned by root. For the (check)file it has created, the same applies.
    Now, if I try to run Apache under root, I get all kinds of warnings, saying, among other things, that I shouldn't run Apache under root, unless I really know what I'm doing (unfortunately, I don't know enough to really know what I'm doing regarding Apache). When I try to install a clean version of Contao, it asks for the FTP credentials, but since I'm running the site on my localhost, I don't know if I can use that, or if I should.

    When I develop my sites on windows, I used Wampserver, which is just an .exe file and will install a complete preconfigured on my system. Contao just works there right out of the box. Using a LAMP on Ubuntu is less user friendly, and there is just so much documentation, I don't even know where to start.

    Does anybody have any helpful advice?
    Thanks in advance.

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default Re: Running Contao on a LAMP

    Probably not the answer you're looking for, but my advice is to just develop the site on the final server. Then you don't have to worry about server (local) config or moving the site. The only drawback I see to this is you can't work on a site in places lacking Internet access.

  3. #3
    User
    Join Date
    08-09-09.
    Location
    Zwolle, The Netherlands
    Posts
    73

    Default Re: Running Contao on a LAMP

    Thanks for your answer, Ben. Actually, I sometimes do develop my websites on the live server, but some sites I'd like to develop on my computer first before they go live.

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default Re: Running Contao on a LAMP

    I was actually suggesting that you put the site in a password protected folder on the live server so no one can see it during development.

  5. #5
    User
    Join Date
    08-09-09.
    Location
    Zwolle, The Netherlands
    Posts
    73

    Default Re: Running Contao on a LAMP

    Yes, I do put websites I'm working on in a separate directory. I hadn't though of password protecting that directory, I'll do that in the future. Thanks for the tip.

    But my original question remains...

  6. #6
    User
    Join Date
    10-15-10.
    Posts
    279

    Default Re: Running Contao on a LAMP

    I'm running on a LAMP myself (CentOS 5, Apache, MySQL, PHP) and run Apache via root and haven't had any issues. I think they give you that warning assuming that you're also hosting this site via your LAMP with apache running under root. If this is the case then yes it is a security issue. But in your case, just using it for developing the site you shouldn't have any problems.

    To change permissions for the the files in question from your user to root, first login as root:
    command line: su
    (then enter root password)
    then to change permissions:
    command line: chmod -R u+rwx *
    (replace * with the directory of your install, in my own case it's /var/www/html)
    the last command will give read/write/execute permissions to root user for the contao directory.

    Hope this is helpful!

    ~Mecha

  7. #7
    User
    Join Date
    08-09-09.
    Location
    Zwolle, The Netherlands
    Posts
    73

    Default Re: Running Contao on a LAMP

    Thanks Mecha.

    This is the solution I wound up using:

    $ sudo chown -R $USER:$USER /var/www

    As described on this page:

    https://help.ubuntu.com/community/ApacheMySQLPHP

    So all I did was change the permissions, not actually run Apache as root.

    - Emiel

Bookmarks

Posting Permissions

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