?
Solved

Configure apache2 to run with cgi

Posted on 2007-11-23
4
Medium Priority
?
2,533 Views
Last Modified: 2013-12-25
I have install Ubuntu and apache2 at home for the first time, and I'm getting crazy to configure the apache2 to run in the port 9999 (or other bigger them 1024).

I have commented everything at ports.conf and I'm trying to set the httpd.conf as



AddHandler cgi-script .cgi .pl
Listen 3000
NameVirtualHost *:3000
<VirtualHost *:3000>
   ServerName oleber.myserver.com
   ServerAdmin my_user@mail.pt
   DocumentRoot /servers/my_path/html
   ErrorLog /servers/my_path/logs/error_log.txt
   TransferLog /servers/my_path/logs/access_log.txt
</VirtualHost>


with the previews configuration I'd be expecting to have already a static webpage server.

But I'm needing to have a cgi directory to

static webpages: /servers/my_path/html
cgi webpages: /servers/my_path/html

Thanks for the help
0
Comment
Question by:oleber
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Author Comment

by:oleber
ID: 20338824
Output of: clear; sudo /etc/init.d/apache2 restart

 * Restarting web server apache2                                                                                            apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Fri Nov 23 14:09:04 2007] [error] VirtualHost *:3000 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Fri Nov 23 14:09:04 2007] [warn] NameVirtualHost *:3000 has no VirtualHosts
httpd (no pid file) not running
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Fri Nov 23 14:09:14 2007] [error] VirtualHost *:3000 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Fri Nov 23 14:09:14 2007] [warn] NameVirtualHost *:3000 has no VirtualHosts
0
 
LVL 29

Expert Comment

by:Jan Springer
ID: 20339199
1) Specify the cgi-bin path
    ScriptAlias /cgi-bin/ "/path/to/cgi-bin/"

2) Comment this out thusly
   # NameVirtualHost *:3000

3) Recommend specifying an FQDN for the ServerName directive in the global config
0
 
LVL 10

Author Comment

by:oleber
ID: 20339676


More for documentation for others:

1º I copyed the file /etc/apache2/sites-available/default to /etc/apache2/sites-available/my_site

2º I alter it to my directories in the file /etc/apache2/sites-available/my_site

3º I created a soft link in the directory /etc/apache2/sites-enabled to the file /etc/apache2/sites-available/my_site

4º I added more 'Listen 3000' to the file ports.conf

5º I set a port to the file /etc/apache2/sites-available/default



The only problem for now seems to be a warning message when I'm starting the servers:

 * Restarting web server apache2                                                                                            apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

What thus this means?
0
 
LVL 29

Accepted Solution

by:
Jan Springer earned 375 total points
ID: 20339851
In your global configuration, there is a directory called 'ServerName'.  If this server has a name, i.e., "my.server.com", set it there.

If the apache config does not have this specified, it means that it will use 127.0.1.1 address as the server name.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question