GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   DNS wildcards for named.conf and Apache are working (almost) (https://gfy.com/showthread.php?t=949294)

camperjohn64 01-20-2010 12:09 AM

DNS wildcards for named.conf and Apache are working (almost)
 
I have about 4000 domains, and wanted to make a generic DNS and Apache configuration that will take ANY domain and park it without having to make an account and park it in Cpanel. This way, any idle domains I have can show ads and content (like godaddy does or any parking service does for that matter)

I have it working too...almost!

1) The configuration allows me to have any domain show a parking page, even if that domain doesn't have an account. This is working fine.

2) Strangely, this new configuration disables the file_get_contents function and the curl function(s).

Does anyone have ideas on why file_get_contents would stop working with the configuration below? How do I fix it so I can park domains, and still have the file_get_contents function working?

Here is the addition to my named.conf file:
Code:

named.conf:

zone "." {
        type master;
        file "/var/named/parking.db";
};

The associated /var/named/parking.db database file:
Code:

/var/named/parking.db:

$TTL    604800
@      86400    IN      SOA    ns1.ryd0.com. john.mccarthy.net. (
                              1        ; Serial
                        604800        ; Refresh
                          86400        ; Retry
                        2419200        ; Expire
                        604800 )      ; Negative Cache TTL

        IN      NS      .
*.      IN      A      204.15.192.194

;@      86400  IN      SOA    ns1.ryd0.com. john.mccarthy.net. (

And the additions to my httpd.conf file
Code:

<VirtualHost 204.15.192.194:80>
    ServerAlias *
    DocumentRoot /home/photof/public_html

    ...more stuff deleted...
</VirtualHost>

Not only does this park domain.com, but it also parks http://www.domain.com, or whatever.domain.com etc etc...

Again, this is working, but it seems to disable file_get_contents. Can I make a second DNS zone that will fix this?

Ideas anyone?

fatfoo 01-20-2010 09:44 AM

camperjohn64, you have 4000 domains? Congratulations, you are really big. These script questions are too complicated for me to answer. I will bump this thread, so maybe some else will answer.

camperjohn64 01-20-2010 10:03 AM

I used to be hosting 49,000 domains...ah the good old days...

The odd thing is about the above settings is that the generic "Host anything" DNS settings work fine, but it also re-routes the file_get_contents function back to itself. So there is obviously something that file_get_contents uses in the DNS to go outside, that is getting wildcarded to come back inside.

It's like the zone "." command means "everything coming in AND going out" rather than just everything coming in.


All times are GMT -7. The time now is 08:08 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123