# [SOLVED]: How to set up system for Apache?

## ONEEYEMAN

Hi, ALL,

I just installed an APACHE 2.2.17.

My /etc/hosts file looks like this:

127.0.0.1      localhost.igorsgentoowork.     localhost

::1                  localhost.igorsgentoowork.     localhost

If I execute just "localhost", I will get

Igorsgentoowork

I find't change anything in the Apache configuration.

Running Apache I am getting an error about Apr_sockaddr_info_get.

What I need to change?

Thank you.Last edited by ONEEYEMAN on Tue Jun 28, 2011 4:00 am; edited 1 time in total

----------

## Veldrin

 *Quote:*   

> If I execute just "localhost", I will get ...

 

What do you mean by just execute localhost?

did you configure your apache? did you start it? where are you trying to connect from?

V.

----------

## ONEEYEMAN

Hi,

Sorry, that should've been "hostname".

Also what do you mean by "configure Apache"?

The error shows up when starting Apache.

Thank you.

----------

## Hu

 *ONEEYEMAN wrote:*   

> What I need to change?

 Your error reporting style could use a bit of work.  :Smile:   Please provide the exact command you executed as root and the full output it produced, with no paraphrasing.

----------

## ONEEYEMAN

Hi, ALL,

I just installed an APACHE 2.2.17.

My /etc/hosts file looks like this:

```

127.0.0.1      localhost.IgorsGentooWork.     localhost

::1                  localhost.IgorsGentooWork.     localhost

```

If I do this, I get:

```

hostname

[b]IgorsGentooWork[/b]

```

I find't change anything in the Apache configuration.

Running Apache I am getting an error about Apr_sockaddr_info_get.

```

/etc/init.d/apache2 start

* Starting apache2...

apache2: apr_sockaddr_info_get() failed for IgorsGentooWork

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

```

What I need to change?

Thank you.

----------

## Veldrin

you problem is, that apache tries to resolve you hostname (IgorsGentooWork) and does not find a IP address for it (thus the apr_sockaddr_info_get() error), as you probably to not have a internal dns running and your /etc/hosts is borked.

the easiest way to solve this it to fix your /etc/hosts:

```
127.0.0.1  localhost IgorsGentooWork

::1  localhost IgorsGentooWork
```

In you nortation, IgorsGentooWork was the domainname, and not the hostname.

V.

----------

## ONEEYEMAN

Veldrin,

Thank you. That was it.

Now I need to figure out where is the "cgi-bin" directory located...

----------

## Veldrin

have a look at /etc/apache2/vhosts.d/default_vhost.include (which gets included in the default vhost (/etc/apache2/vhosts.d/00_default_vhost.conf)) to tell where it is located.

by default it should be in /var/www/localhost/cgi-bin, which can be accessed though http://localhost/cgi-bin.

----------

