LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-14-2013, 08:29 AM   #1
codeguy
LQ Newbie
 
Registered: Jan 2004
Distribution: Slackware
Posts: 28

Rep: Reputation: 1
Request: Apache 2.4 with lua support


Currently our apache 2.4 does not include lua support. We do have a lua package on slackbuilds.org however. And if you install that, then recompile the httpd package from source, it works!

Would it be possible to get the lua (and maybe even luajit) package into core, and rebuild apache?

Pretty please?

-Andy
 
Old 07-14-2013, 08:37 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,546

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
what advantage does we get by adding lua support?
 
Old 07-14-2013, 08:39 AM   #3
codeguy
LQ Newbie
 
Registered: Jan 2004
Distribution: Slackware
Posts: 28

Original Poster
Rep: Reputation: 1
... we can write web pages in lua.
 
Old 07-14-2013, 08:43 AM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,428

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
https://httpd.apache.org/docs/trunk/mod/mod_lua.html
other examples
http://www.admin-magazine.com/Articles/Lua-for-Apache

@codeguy: note this block
Code:
mod_lua is still in experimental state. Until it is declared stable, usage and behavior
may change at any time, even between stable releases of the 2.4.x series. Be sure to check
the CHANGES file before upgrading.

Warning

This module holds a great deal of power over httpd, which is both a strength and a
potential security risk. It is not recommended that you use this module on a server
that is shared with users you do not trust, as it can be abused to change
the internal workings of httpd.
IMHO, also in case lua-5.1 (5.2 is still incompatible with most of the things out there) will be included in Slackware (I got nothing against this in particular, on the opposite I would like to see it in ) and httpd will be rebuilt over it, it's still better to leave mod_lua commented out by default in httpd.conf and add a big fat warning for who wants to enable it.

maybe having to rebuild httpd specifically for having a mod_lua (like it's ATM) is not that bad as even more n00b-safe (one has to do it knowingly).

Last edited by ponce; 07-14-2013 at 09:58 AM. Reason: specified I got nothing against lua-5.1 in Slackware
 
Old 07-14-2013, 08:56 AM   #5
codeguy
LQ Newbie
 
Registered: Jan 2004
Distribution: Slackware
Posts: 28

Original Poster
Rep: Reputation: 1
Agreed. I haven't written a lick of lua code yet. (Well, for apache/web. I've written quite a bit in other projects).

I'd like to get it in now so I can play with it, and see if it'll be awesome.

I already have to rebuild my own php-pgsql-client every freeking time there is a php update, because there is no Postgresql client (so no php support) in core. Its really annoying. So before I go any further w/lua, I wanna make sure it'll be supported.

-Andy
 
Old 07-14-2013, 09:18 AM   #6
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,428

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
Quote:
Originally Posted by ponce View Post
maybe having to rebuild httpd specifically for having a mod_lua (like it's ATM) is not that bad as even more n00b-safe (one has to do it knowingly).
maybe you missed this edit.
rebuilding httpd for an additional feature is not like rebuilding php: it needs just an handful of minutes even on slow hardware and it won't get updated as often as php...

Quote:
Originally Posted by codeguy View Post
I'd like to get it in now so I can play with it, and see if it'll be awesome.
but as you just rebuilt apache you actually can do already all the tests that you want.

Quote:
Originally Posted by codeguy View Post
So before I go any further w/lua, I wanna make sure it'll be supported.
it's still considered experimental by the apache developers theirselves...

Last edited by ponce; 07-14-2013 at 09:59 AM.
 
Old 07-14-2013, 09:52 AM   #7
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 436

Rep: Reputation: Disabled
Quote:
ponce:
(5.2 is still incompatible with most of the things out there)
Indeed. vlc is one which won't build (both 2.0.7 and 2.1.0-pre) against the new lua-5.2.2. However, with that said I wouldn't mind seeing lua in Slackware whether it's solely for httpd or not.

Last edited by TommyC7; 07-14-2013 at 09:55 AM. Reason: typo fix
 
Old 07-14-2013, 10:05 AM   #8
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,428

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
best would be in a way that it can be parallel installable to the 5.2.x version (the scripts on SBo don't allow that): gotta still see if I find something to do this cleanly (the build scripts by its devs seemingly are not much of help for this)...

Last edited by ponce; 07-14-2013 at 10:06 AM.
 
Old 08-02-2013, 02:50 AM   #9
Humbedooh
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by ponce View Post
it's still considered experimental by the apache developers theirselves...
Just a note from one of the core developers on this module; By "experimental" we do not mean "it doesn't work and is unsupported", what we mean is; It's still being worked on actively, and new features may enter into play at any given time. Some internal mechanisms may get upgraded, some default directive values may change, but your scripts/usage would stay largely unaffected by this. If you write a script do to X, then you can rest assured that it'll still do X in the next version of httpd, there just may be another way of doing X, or it may be recommended/preferred to do Y instead at that point. I've used mod_lua since the birth of httpd 2.4, and I haven't had to change or invalidate my scripts since that time, I've ever only had the pleasure of upgrading scripts to take advantage of new features as they became available (the database interface for example). On a few occasions, I've had to change minor bits and bobs in my code, but that has usually been because we found a more clever way of writing a function (for instance, changing a return value from an int to a float, or accepting more arguments in a regex function).

To put this into perspective; We at Apache use mod_lua for quite a bit of sites, including (but not limited to) our modules database, our paste bin, our online commenting system and so on. All these sites are freely available under the ALv2 license in our subversion repositories, and we're quite comfortable using this on production servers.

To sum up; We quite like (working with/on) this module, it's just as safe to use on production servers as any other language module, we're actively working on enhancing it, and we'd love to answer any questions (whether it be tech support or just how to use it) on either IRC (#httpd on Freenode) or on one of our mailing lists.
 
Old 08-02-2013, 04:25 AM   #10
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 495

Rep: Reputation: 207Reputation: 207Reputation: 207
Quote:
Originally Posted by Humbedooh View Post
Just a note from one of the core developers on this module; By "experimental" we do not mean "it doesn't work and is unsupported", what we mean is; It's still being worked on actively, and new features may enter into play at any given time.

< snip >
Forgive me for derailing this thread slightly: I have recently been wondering whether or not to take up Lua, and I was wondering if it can replace PHP for database-driven websites. Reading this thread (and prescinding from reliability and security issues), am I right to conclude it can?
 
Old 08-02-2013, 04:30 AM   #11
Humbedooh
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by gezley View Post
Forgive me for derailing this thread slightly: I have recently been wondering whether or not to take up Lua, and I was wondering if it can replace PHP for database-driven websites. Reading this thread (and prescinding from reliability and security issues), am I right to conclude it can?
Short answer: Yes, it can.

Long answer: You can natively use mySQL, PostgreSQL (pgsql driver seems broken at the moment), FreeTDS, ODBC, SQLite and Oracle with mod_lua. For more details on working with databases, see http://httpd.apache.org/docs/current...html#databases If you choose to give it a spin, Always use prepared statements when you can - you don't want to risk little Bobby Tables ruining your work
 
Old 08-02-2013, 05:45 AM   #12
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 495

Rep: Reputation: 207Reputation: 207Reputation: 207
Quote:
Originally Posted by Humbedooh View Post
Short answer: Yes, it can.
Interesting. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to compile conky with lua support Stephen Morgan Slackware 2 03-03-2013 11:07 AM
a request that LQ review the status of the LQ puppy support sub-forum jonyo LQ Suggestions & Feedback 6 12-10-2011 01:15 PM
Request for Postgresql client and php support codeguy Slackware 2 09-11-2011 08:44 PM
iTunes feedback request Linux support matthekc Linux - General 2 07-24-2009 02:58 PM
HTTP::Request and CPAN support amer_58 Linux - Newbie 2 03-30-2005 11:46 AM


All times are GMT -5. The time now is 07:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration