ispCP - Board - Support
admin.x.com used to works - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: admin.x.com used to works (/thread-3207.html)

Pages: 1 2 3


RE: admin.x.com used to works - Zothos - 05-08-2008 06:51 AM

yep... your domain is fucked up Tongue


RE: admin.x.com used to works - Lordek - 06-30-2008 10:32 PM

Hi!

I've changed of register and the same problem happens, sometimes it works and sometimes it doesnt..

Why doenst it work?


RE: admin.x.com used to works - weblivehelp - 06-30-2008 11:06 PM

Ok,

I don't know if it's an ispcp bug or not, but what I did was remove admin.x.com.db in /var/cache/bind and replace it with x.com.db

in x.com.db I added the admin subdomain entry (you can "copy" from www)

Then, on /etc/apache2/sites-available/ispcp.conf (and then on /etc/ispcp/apache/working/ispcp.conf)

I removed the admin subdomain VirtualHost Entry and added the admin.x.com in the ServerAlias entry for the x.com VirtualHost entry.

I think that was it... I don't really remember because I did it a while ago, but let me know if it works or if you go into any trouble.


RE: admin.x.com used to works - kilburn - 07-02-2008 03:27 AM

AFAIK the problem is that ispcp expects the admin panel to be located under "xxxx.server.domain.tld" (xxxx being admin by default), so it creates a "server.domain.tld" zone file using the "db_master.tpl" part.

You are using "xxxx.domain.tld" instead, so when you install it creates a "domain.tld" zone file using the "db_master.tpl" part.

Then you add "domain.tld" as a hosted domain through the panel, and it creates a "domaint.tld" zone file using "db_e.tpl" parts (which has no "admin" entry)... and overriding the "master" zone file created before!

IMHO this is an ispcp bug and you should create a ticket Wink


RE: admin.x.com used to works - weblivehelp - 07-02-2008 07:57 AM

I haven't created a ticket to know the community opinion, but my resolution would be:

create the domain.tld.db file instead of admin.domain.tld.db and the subdomain the user chooses (admin.domain.tld) would be created an alias for ispcp/gui and domain.tld would have its own www/virtual/domain.tld folder to put contents. Then, if the user wants to domain.tld redirect to admin.domain.tld he can create this redirect in a php file or in apache, either way, I think it would make more sense, what do you people think?!


RE: admin.x.com used to works - Lordek - 07-02-2008 12:47 PM

Hi!

Thanks for your help. I ve tried the fix that weblivehelp did post but nothing happens
weblivehelp Wrote:Ok,

I don't know if it's an ispcp bug or not, but what I did was remove admin.x.com.db in /var/cache/bind and replace it with x.com.db

in x.com.db I added the admin subdomain entry (you can "copy" from www)

Then, on /etc/apache2/sites-available/ispcp.conf (and then on /etc/ispcp/apache/working/ispcp.conf)

I removed the admin subdomain VirtualHost Entry and added the admin.x.com in the ServerAlias entry for the x.com VirtualHost entry.

I think that was it... I don't really remember because I did it a while ago, but let me know if it works or if you go into any trouble.

Can you tell me step by step what have I to do? I have tried too changing the domain configuration on the register website. I can redirect with one primary nameserver or with a CNAME A to the 2ndlevel domain/IP

Apologies for my poor english Sad


RE: admin.x.com used to works - weblivehelp - 07-02-2008 05:37 PM

Hi Lordek, I'll do a step by step tutorial today later, at about 18h (GMT, that is -1h than spain)


RE: admin.x.com used to works - Lordek - 07-02-2008 10:23 PM

Thank you weblivehelp Wink


RE: admin.x.com used to works - weblivehelp - 07-04-2008 05:52 PM

!!! I totally forgot about this... sorry but I'm in a very busy week. I'll try to have something for you today, I've put it on a post-it! Big Grin


RE: admin.x.com used to works - weblivehelp - 07-05-2008 04:51 AM

EDIT: This has worked for Lordek!

Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!

Ok,

Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!
Please DO BACKUPS OF ALL FILES you're going to change!!!!!!!!!!

Now...

This tutorial assumes you already created a user for your server domain on ispCP, if you didn't, DO! Smile

Go to /etc/ispcp/bind/working

Code:
cd /etc/ispcp/bind/working

edit your domain file with your favorite editor (vi, pico, nano, etc...):

Code:
nano domain.tld.db

make your file look like this (please be aware you should change domain, subdomain and ip information according to your needs), basically you should only have to add the submain part on the end of the file

Code:
$TTL 12H
$ORIGIN domain.tld.
@               IN              SOA             ns1.domain.tld. postmaster.domain.tld. (
; dmn [domain.tld] timestamp entry BEGIN.
                2008043000     ; Serial
; dmn [domain.tld] timestamp entry END.
                8H              ; Refresh
                15M             ; Retry
                4W              ; Expire
                3H              ; Minimum TTL
)
                IN              NS              ns1.domain.tld.
                IN              NS              ns2.domain.tld.
                IN              MX      10      mail.domain.tld.

domain.tld.     IN              A               HEREGOESYOURSERVERIP
www             IN              A               HEREGOESYOURSERVERIP
domain.tld.     IN              TXT             "v=spf1 a mx ip4:HEREGOESYOURSERVERIP ~all"
localhost       IN              A               127.0.0.1
mail            IN              A               HEREGOESYOURSERVERIP
ns1             IN              A               HEREGOESYOURNAMESERVER1IP
ns2             IN              A               HEREGOESYOURNAMESERVER2IP
; CNAME for mail transfer
imap            IN              CNAME           mail
pop             IN              CNAME           mail
pop3            IN              CNAME           mail
relay           IN              CNAME           mail
smtp            IN              CNAME           mail
; CNAME for web transfer
ftp             IN              CNAME           www
; sub [admin.domain.tld] entry BEGIN.
admin                          IN      A       HEREGOESYOURSERVERIP
; sub [admin.domain.tld] entry END.
; sub [{SUB_NAME}] entry BEGIN.
; sub [{SUB_NAME}] entry END.

after saving file, copy it to your bind cache folder, usually on a debian system: /var/cache/bind/ overwriting the file in there

Code:
cp domain.tld.db /var/cache/bind/

now edit your zones file to remove the admin.domain.tld.db file

Code:
nano /etc/bind/named.conf

find something like

Code:
// dmn [admin.domain.tld] cfg entry BEGIN.
zone "admin.domain.tld" {
        type    master;
        file    "/var/cache/bind/admin.domain.tld.db";
        notify  YES;
};
// dmn [admin.domain.tld] cfg entry END.

and remove/comment it like

Code:
// dmn [admin.domain.tld] cfg entry BEGIN.
//zone "admin.domain.tld" {
//        type    master;
//        file    "/var/cache/bind/admin.domain.tld.db";
//        notify  YES;
//};
// dmn [admin.domain.tld] cfg entry END.

now restart bind

Code:
/etc/init.d/bind9 restart

if any error occurs, let us know in the forum...

now we'll edit the apache virtualhost settings for admin.domain.tld go to ispCP.

go to /etc/apache2/sites-available

Code:
cd /etc/apache2/sites-available

now edit your virtualhosts file to remove the *.domain.tld alias entry

Code:
nano ispcp.conf

now find something like this:

Code:
ServerName    domain.tld
ServerAlias     www.domain.tld domain.tld *.domain.tld

change it to

Code:
ServerName    domain.tld
ServerAlias     www.domain.tld domain.tld

after saving the file, copy it to /etc/ispcp/apache/working directory, overwriting the file there

Code:
cp ispcp.conf /etc/ispcp/apache/working/

now restart apache

Code:
/etc/init.d/apache2 restart

now all should work fine and domain.tld go to your site and admin.domain.tld go to ispCP

Let me know if it helped!!!