Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Configure apache2 to run with cgi

Posted on 2007-11-23
4
Medium Priority
?
2,535 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

604 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