server configuration

Discussion in 'HOWTO-Related Questions' started by smathaven, Mar 8, 2007.

  1. smathaven

    smathaven New Member

    i have up a web server and a mail server using debian on the same pc. Now i want to break down the webserver and mail server into two different Pcs, i.e have the web server on one PC and the mail server on a second PC. I will be very grateful if you could help by telling me what configuration i have to do, i have searched everywhere but i still dont know how to do it.

    My main problem is i dont know what to do with the DNS,

    * Should i intall it on the web server? If i do, what configuration
    do i have to do with the mail server? How do i access the
    mailserver from the Internet? (Through Phpmyadmin). How do iconfigure apache on the mailserver.

    * My web server is also using mysql and phpmyadmin.

    Can you please help me how to setup my dns, and i have only one IP address? . can i have one web server on this address "http://www.npccmauritius.com" and "http://mailserver.npccmauritius.com/

    Thanking you in advance
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Let's assume your servers have the IP addresses 1.2.3.4 (webserver) and 1.2.3.5 (mailserver).
    In DNS, you'd create the following records:

    npccmauritius.com. A 1.2.3.4
    www.npccmauritius.com. A 1.2.3.4
    mailserver.npccmauritius.com. A 1.2.3.5
    npccmauritius.com. MX 0 mailserver.npccmauritius.com.
     
  3. smathaven

    smathaven New Member

  4. falko

    falko Super Moderator Howtoforge Staff

  5. smathaven

    smathaven New Member

    How do i create the website, i want to put it on another pc? how do i add it to my current dns server configuration. is this setting up a subdomain?
     
  6. falko

    falko Super Moderator Howtoforge Staff

  7. smathaven

    smathaven New Member

    I have configured my dns server and added the following configuration to it:
    $ORIGIN test.mailserver.npccmauritius.com
    test IN A 192.168.192.42
    IN MX 10 test.mailserver.npccmauritius.com.

    check IN CNAME test.mailserver.npccmauritius.com.


    when i ping check.npccmauritius.com, it responds but i get the content of what is on www.npccmauritius.com

    how do i redirect it to the check.npccmauritius.com? can i add it in the Virtual host part in Apache? I have tried to add it in the httpd.conf but it still redirects to www.npccmauritius.com. Sorry for all inconvenient caused, i am getting some light now
    Thanks a lot for your help
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Are you sure you want to use a local IP address for a DNS record?

    Did you create an Apache vhost for check.npccmauritius.com? Because otherwise your requests go to the default vhost.
     
  9. smathaven

    smathaven New Member

    Is it wrong to add an internal IP in Dns?

    I have added the following in the httpd.conf

    NameVirtualHost 192.168.192.42
    <VirtualHost 192.168.192.42>
    ServerName check.npccmauritius.com
    DocumentRoot /var/www/
    </virtualHost>
    but still it redirects to www.npccmauritius.com
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    If noone else then poele in your local setup shall lookup the domain, then thats fine. If someone from the internet shall be able to lookup this domain, you will have to use a official (external) IP address.
     
  11. smathaven

    smathaven New Member

    why is it that i cannot access the web site that is on the check.npccmauritius.com (i.e 192.168.192.42)?
    do i have to do another configuration somewhere?
     
  12. falko

    falko Super Moderator Howtoforge Staff

    What's the vhost configuration of www.npccmauritius.com, and what's the output of
    Code:
    ifconfig
    ?
     
  13. smathaven

    smathaven New Member

    the result of IPCONFIG is
    eth0 Link encap:Ethernet HWaddr 00:04:75:c8:95:b1
    inet addr:192.168.192.1 Bcast:192.168.192.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1024 errors:1 dropped:0 overruns:0 frame:0
    TX packets:1024 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:155132 TX bytes:620
    Interrupt:28

    lo Link encap:Ethernet local loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP BROADCAST RUNNING MULTICAST MTU:3924 Metric:1
    RX packets:1024 errors:1 dropped:0 overruns:0 frame:0
    TX packets:1024 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:218 TX bytes:23909
     
  14. smathaven

    smathaven New Member

    the ifconfig result is as follows:
    eth0 Link encap:Ethernet HWaddr 00:04:75:c8:95:b1
    inet addr:192.168.192.1 Bcast:192.168.192.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1024 errors:1 dropped:0 overruns:0 frame:0
    TX packets:1024 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:155132 TX bytes:620
    Interrupt:28

    lo Link encap:Ethernet local loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP BROADCAST RUNNING MULTICAST MTU:3924 Metric:1
    RX packets:1024 errors:1 dropped:0 overruns:0 frame:0
    TX packets:1024 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:218 TX bytes:23909
     
  15. falko

    falko Super Moderator Howtoforge Staff

    What's the vhost configuration of www.npccmauritius.com?

    Please make sure you use 192.168.192.1 instead of 192.168.192.42 in your Apache configuration.
     
  16. smathaven

    smathaven New Member

    NameVirtualHost 192.168.192.42
    <VirtualHost 192.168.192.42>
    ServerName check.npccmauritius.com
    DocumentRoot /var/www/
    </virtualHost>

    isn't this vhosts?
     
  17. falko

    falko Super Moderator Howtoforge Staff

    That's the vhost configuration of check.npccmauritius.com, not www.npccmauritius.com.
     

Share This Page