Solved

Configure apache2 to run with cgi

Posted on 2007-11-23
4
2,527 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 28

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 28

Accepted Solution

by:
Jan Springer earned 125 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Merging text files strings with filename 18 54
Political Map of Europe - Wikipedia? 4 43
calculate days away 11 59
powershell script error 2 28
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

738 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