SQL-Ledger Homepage

SQL-Ledger User Forum

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Apache 2.4 config (General)

posted by Dieter Simader(R), 30.12.2014, 13:28

I've been spending the last days of 2014 updating and upgrading equipment
and software. One of the projects was the machine where Sql-Ledger resides.
The machine was a 14 year old Gateway with 256mb of rdram (Rambus) running
Ubuntu server 8.04 and Sql-Ledger 2.8.21. It's now a generic case with a
motherboard of much more recent vintage running Ubuntu 14.04 LTS and
Sql-Ledger 3.06.

The install went fine, I overcame minor issues just by reading the Faq, but
faced some problems with Apache 2.4. I was using Apache 2.2 on the previous
install and things have changed!

On Ubuntu 14.04 server, there is no httpd.conf file. You can make one and
it still won't work.

As it's stated on the Apache 2 default page for Ubuntu:

The configuration layout for an Apache2 web server installation on
Ubuntu systems is as follows:

|-- apache2.conf
| `-- ports.conf
|-- mods-enabled
| |-- *.load
| `-- *.conf
|-- conf-enabled
| `-- *.conf
|-- sites-enabled
| `-- *.conf

The only way I was able to get the thing to work was to put this entry
(from the Faq) directly into the apache2.conf file:

AddHandler cgi-script .pl
AddDefaultCharset On
Alias /sql-ledger /usr/local/sql-ledger/
<Directory /usr/local/sql-ledger>
Options ExecCGI Includes FollowSymlinks

<Directory /usr/local/sql-ledger/>
AllowOverride None
Require all granted

This does not seem like best practice. What if an update overwrites

create a 'sql-ledger.conf' with the above and put it into the sites-available directory then symlink the file from the sites-enabled directory.

My question is where should I put the above entry in order to follow best
practices under Apache 2.4. The httpd.conf option no longer exists.

Also I had to invoke "sudo a2enmod cgi" to get Apache 2.4 to run Perl
scripts. Do I need to change an entry somewhere to make sure the webserver
knows to run this module as its default?



In order to have .pl recognized as a script add a 'httpd.conf' file in conf-available and symlink the file from conf-enabled.

all you need in the file is

ServerName your.servername
AddHandler cgi-script .pl

all configuration files for Apache 2.4 must have a .conf extension otherwise they won't be read in by the server.

There is no need to change any of the configuration files which come with Ubuntu.


Complete thread:

Back to the forum
Board view  Mix view
1007 Postings in 335 Threads, 364 registered users, 109 users online (0 registered, 109 guests)
SQL-Ledger User Forum | Admin contact
powered by my little forum