LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Webserver apache: Called website shows the index of all available sites (https://www.linuxquestions.org/questions/linux-server-73/webserver-apache-called-website-shows-the-index-of-all-available-sites-4175423965/)

Sebi94 08-25-2012 11:29 AM

Webserver apache: Called website shows the index of all available sites
 
Hello community!
I want to find the error in my configuration. If I call a website, I will be redirected to it, but I can't see the called website. I can see an index of all available sites on the server.

Can somebody help me to find the error?

Quote:

Originally Posted by Apache Error Log
[Sat Aug 25 17:49:45 2012] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ps.ini on line 1 in Unknown on line 0
[Sat Aug 25 17:49:46 2012] [notice] Apache/2.2.22 (Debian) PHP/5.3.3-7+squeeze14 with Suhosin-Patch configured -- resuming normal operations
[Sat Aug 25 18:00:55 2012] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ps.ini on line 1 in Unknown on line 0
[Sat Aug 25 18:01:10 2012] [notice] Apache/2.2.22 (Debian) PHP/5.3.3-7+squeeze14 with Suhosin-Patch configured -- resuming normal operations

Quote:

Originally Posted by /etc/apache2/httpd.conf (manually created, cause it wasn't available
Listen 80
NameVirtualHost *:80

<VirtualHost *:80>
ServerName http://fascinatinggaming.no-ip.info/
ServerAlias fascinatinggaming.no-ip.info
ServerAdmin Clan%WatL@gmx.de

DocumentRoot /var/www/FG
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/FG>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:80>
ServerAdmin Sebastian-Kraetzig@gmx.de
ServerName http://mk-trockenbau.no-ip.info/
ServerAlias mk-trockenbau.no-ip.info

DocumentRoot /var/www/mktrockenbau
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/mktrockenbau>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:80>
ServerAdmin Sebastian-Kraetzig@gmx.de
ServerName http://kraetzig.no-ip.info/
ServerAlias kraetzig.no-ip.info

DocumentRoot /var/www/wordpress
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Thanks forwarding! :)

bathory 08-25-2012 11:56 AM

Hi,

Well, the ServerName is wrong for both your vhosts. It must be a FQDN and not a URL, so change it to
Code:

<-snip->
ServerName fascinatinggaming.no-ip.info
<-snip->
ServerName mk-trockenbau.no-ip.info
<-snip>

Quote:

Originally Posted by /etc/apache2/httpd.conf (manually created, cause it wasn't available
Please note that in debian, httpd.conf is not used. All relevant configuration is located in apache2.conf instead. Also the vhosts are defined under /etc/apache2/sites-available and are enabled running:
Code:

a2ensite
See this for more details

Regards

Sebi94 08-25-2012 07:01 PM

Thanks, but I've read, that it's a bug. I use Debian 6.0.5. In my file under sites-available/ is already the ServerName written.

If with or without "http://", I'll get this error.

But... I fixed the error with the index. Thanks a lot! :)

But now, I've got an other question: My friend told me, that he can't see some or all pictures on the website. He isn't the only one with that mistake. All files have the permissions 644 and all directories the permissions 755. I've tested the pictures with different paths. I saved the path in the files like that:

/var/www/FG/images/banner.png
/images/banner.png
images/banner.png

Just visit the site and watch it self: http://fascinatinggaming.no-ip.info/

Error-Log of apache doesn't say anything. It's just error-free. ;)

bathory 08-26-2012 12:20 PM

Quote:

Just visit the site and watch it self: http://fascinatinggaming.no-ip.info/
It works from here.
Perhaps your friend should clear his/her browser cache.

Regards

Sebi94 08-26-2012 02:28 PM

Thanks for your informations. :)


All times are GMT -5. The time now is 11:33 PM.