lozaria's picture

Hello,

I'm very new to Turnkey LAMP and Linux and I got disappointed at first glance because my Wordpress couldn't start - it brings 500 error. So I needed to dig into Apache log files where I found that I needed to activate some PHP modules. That's so so fine, probably because of security, but what pissed me of is that I needed to install curl by searching on internet and then logging into ssh in order to run such popular and generic web platform. I don't find this user friendly.

 

Forum: 
Jeremy Davis's picture

Hi there Lozaria. Welcome to TurnKey. Thanks for sharing your feedback.

I assume that you are referring to php-curl? I say that because curl itself is installed by default to all TurnKey servers.

FWIW our LAMP appliance is intended to be a fairly minimalist whilst aiming to also be generically useful. In fact all our appliances are aimed to be a combo of maximum utility with smallest possible footprint. Considering that there are currently at least 63 PHP related packages in Debian (what TurnKey is based on). Each additional module installed (and enabled) requires our mirrors to server larger files, bigger initial user downloads, more RAM usage when running and more security update downloads (whenever there is a security update for PHP). So we need to draw the line somewhere.

Considering that there are literally thousands of 3rd party PHP apps designed to run on LAMP, with a myriad of specific requirements (many which don't need php-curl, but may have other requirements) we decided that in the case of a generic appliance such as LAMP, less is more.

I realise that php-curl is not some weird, esoteric requirement, but it's also worth noting that of the ~70 LAMP/PHP based appliances that we build and distribute, only just over half of them (39 at last count) require php-curl. Many of the others have different alternate requirements, that you would likely not need for your WordPress install. It's also worth noting, that had you instead chosen our pre-built WordPress appliance (rather than the generic LAMP), then you would have had php-curl pre-installed, Not to mention WordPress itself! :)

Although I certainly do acknowledge that for a user with no experience with Linux, and perhaps a discomfort and/or lack of familiarity with the commandline, it may not be immediately obvious how easy it is to install new modules. Without the knowledge and understanding that it's as easy as "apt update && apt install php-curl && service apache2 restart" I can see that it could be quite frustrating...

So clearly we need to do a better job of informing and educating users on just how easy it can be. Do you have any specific ideas or suggestions? I'd love to hear your thoughts on that, as perhaps we can implement some improvements for the next release?

lozaria's picture

Hello Jeremy,

Thanks for your comprehensive explanation. My intention was to migrate from WAMP to LAMP and Turnkey looked very promising to me. I like the features and look of the web GUI. I also plan to run other than Wordpress paltforms on it. The real problem is that I'm real noob in Linux and I expected those migration of popular platforms to go smooth. But still I'm experiencing issues with the configuration - the permalinks of Wordpress are not working probably of some settings in httpd.conf and also have to edit manually vhosts in order to make specific domain to run on its own directory inside www. Now all domains/vhosts point to the same folder, dont't know how this has happened but I will fix it.

As suggestion maybe I can propose to have more enhnanced version of LAMP and to keep the good job!

Jeremy Davis's picture

Ah ok, if you're planing to run additional software, then using LAMP as the base certainly makes plenty of sense. And thanks for your kind perspective for my rambling posts... I'm fairly well known for it... :)

Whilst the web UI is easy on the eye and is great for quick adjustments, personally I find configuring Apache from the commandline far more straight forward and intuitive (but obviously YMMV). Also as a side note, it's probably worth noting that Webmin has a module for installing packages (e.g. that php-curl package you needed). I still think commandline is quicker and easier, but again, you may find that preferable?

FWIW, as a general rule, most of the PHP extensions which are packaged within Debian are "php-<ext_name>". E.g. the PHP XML extension is "php-xml". If you are looking for something, I find the online Debian package search a useful tool. Once you find the name of the pacakge, it can be easily installed either via Webmin or commandline.

Re your current issues, I'm not sure, but my guess is that it needs the Apache rewrite module enabled (it's included by default, but not enabled). To use that, you'll need to enable it:

a2enmod rewrite

Another thing that may be related is Apache using .htaccess files (or not, more likely). IIRC WordPress has .htaccess files that support the url rewriting etc. To ensure that those are read, within your Apache config for your WordPress virtual host/site (not sure where Webmin puts it, but if I had set it up, it would be /etc/apache2/sites-available/wordpress.conf) within the web root Directory block, ensure that you have 'AllowOverride All'. Otherwise Apache will ignore the .htaccess files. E.g.:

<Directory /var/www/wordpress/>
    AllowOverride All
    # ... other config here ...

Plus whenever you make changes to Apache config, you need to restart it:

service apache2 restart

Add new comment