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:

/etc/apache2/
|-- 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>

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


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


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?

Thanks,

Richard

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
976 Postings in 320 Threads, 326 registered users, 60 users online (0 registered, 60 guests)
SQL-Ledger User Forum | Admin contact
RSS-Feed
powered by my little forum