SQL-Ledger Homepage

SQL-Ledger User Forum

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Richard Rogginger(R)

30.12.2014, 08:48
 

Apache 2.4 config (General)

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?

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

Dieter Simader(R)

30.12.2014, 13:28

@ Richard Rogginger
 

Apache 2.4 config

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.

Richard Rogginger(R)

04.01.2015, 10:44

@ Dieter Simader
 

Apache 2.4 config

All is well. I thought I had tried that, but your concise instructions are what I needed. Works like a charm!!


Richard

Back to index page
Thread view  Board view
976 Postings in 320 Threads, 326 registered users, 117 users online (0 registered, 117 guests)
SQL-Ledger User Forum | Admin contact
RSS-Feed
powered by my little forum