PDA

Bekijk Volledige Versie : Shared IP



Dries.S
08/01/15, 16:02
Sinds vandaag heb ik een probleem, al mijn directadmin users ( ik ben ook admin/reseller ) krijgen "This IP is being shared among many domains.
" te zien. Wat ik heb gedaan is een nieuwe user aangemaakt en sinds dan heb ik dit probleem.

Na het verwijderen van deze gebruiker blijft het probleem actief. Iemand die kan helpen?

Dit is de inhoud van /etc/httpd/conf/extra/httpd-vhosts.conf:


#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

################################################## ########
# Use name-based virtual hosting. #
# All NameVirtualHost lines are in this file #
# Don't remove this line or apache will generate errors. #
################################################## ########
Include /etc/httpd/conf/ips.conf

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost XX.XX.XX.XX:80>
ServerAdmin webmaster@localhost
AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
DocumentRoot /var/www/html
ServerName localhost
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

<VirtualHost XX.XX.XX.XX:443>
ServerAdmin webmaster@localhost
AliasMatch ^/~([^/]+)(/.*)* "/home/$1/public_html$2"
DocumentRoot /var/www/html
ServerName localhost
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
CustomLog /var/log/httpd/homedir.log homedir

SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCACertificateFile /usr/local/directadmin/data/users/admin/domains/axonet.be.cacert
</VirtualHost>

En dit van /etc/httpd/conf/ips.conf


# Auto generated apache config file by DirectAdmin version 1.46.3
# Modifying this file is not recommended as any changes you make will be
# overwritten when you add/remove ip's through DirectAdmin.

LogFormat "%O \"%r\"" homedir


<VirtualHost XX.XX.XX.XX:80>
ServerName shared.domain
#ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
#AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
UserDir public_html
DocumentRoot /home/admin/domains/sharedip

SuexecUserGroup admin admin

CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

<VirtualHost XX.XX.XX.XX:443>
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key


ServerName shared.domain
#ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
#AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
UserDir public_html
DocumentRoot /home/admin/domains/sharedip

SuexecUserGroup admin admin

CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

Dries.S
08/01/15, 16:36
Blijkbaar waren volgende lijnen niet meer in de ips.conf.

NameVirtualHost xx.xx.xx.xx:80
NameVirtualHost xx.xx.xx.xx:443

Na het terugplaatsen van deze lijnen en het opnieuw aanmaken van een gebruiker waren deze lijnen weer verwijderd.

Domenico
08/01/15, 16:50
Bedankt voor het plaatsen van de oplossing! :)

Spyder01
08/01/15, 18:28
Een rewrite van de confs via custombuild fixt dit doorgaans ook goed.

Mark17
08/01/15, 19:52
Een rewrite van de confs via custombuild fixt dit doorgaans ook goed.

Niet als je templates voor de configs fout zijn.

Mark17
08/01/15, 19:54
Blijkbaar waren volgende lijnen niet meer in de ips.conf.

NameVirtualHost xx.xx.xx.xx:80
NameVirtualHost xx.xx.xx.xx:443

Na het terugplaatsen van deze lijnen en het opnieuw aanmaken van een gebruiker waren deze lijnen weer verwijderd.

Toen ik je verhaal las kwam het me al bekend voor van een bepaald irc kanaal (freenode/##directadmin). Overigens als het fout blijft gaan kun je ze ook in /etc/httpd/conf/extra/httpd-vhosts.conf zetten boven/onder de include van /etc/httpd/conf/ips.conf. Dat zou het probleem met het verdwijnen ook moeten oplossen als alternatieve oplossing...

Spyder01
08/01/15, 20:54
Niet als je templates voor de configs fout zijn.

Ik las inderdaad niet goed. Dacht dat ze uit de configfiles zelf verdwenen waren, niet uit de templates.