Web Hosting Talk







View Full Version : Cobalt Question.


-Edward-
09-30-2000, 04:55 PM
On a cobalt server is it possible for the owner of a virtual account to stop access to there domian without contacting there host?.

Can it be done using .htaccess???.

or cant it be done without asking my host todo it?.

Félix C.Courtemanche
09-30-2000, 05:12 PM
add something like this in your .htaccess file

(in your base web directory)

----------- .htaccess ------------
deny from all
----------------------------------

(do not inlcude the '-----')

Everyone visiting your web site will get a 403 forbidden error.

-Edward-
09-30-2000, 05:15 PM
What about if i want to lock out a certain person only a certain set of ip address'es ?.

Félix C.Courtemanche
09-30-2000, 05:29 PM
deny from 123.123.123.123
to deny a specific ip (add more ips by putting a space between them)

deny from 123.123.123
to deny anyone from 123.123.123.0 <=> 123.123.123.255

you get the idea.

Chicken
09-30-2000, 05:33 PM
Now I think that Cobalt's CP tends to overwrite the httpd.conf file when you make changes via the CP (there-by killing any changes you might have made to it manually), but just for the heck of it-

If you wanted to make this serverwide you'd place it in your srm.conf ro httpd.conf file, yes?

-Edward-
09-30-2000, 05:37 PM
Thanks i just tryed that and it worked thank u very much felix.

Chicken dunno dont own the server im sticking it in my .htaccess file lol.

Félix C.Courtemanche
09-30-2000, 05:40 PM
Cobalt only overwrite the <virtual></virtual> part of the domain that you change.

For example, lets say you deciede to add this server wide in your httpd.conf file, it will remain there.

If you add something in one of your virtual site's directives, it will stay there untill you modify that accoutn through the CP or remove it through the CP. So if you have a site that has all it needs enabled, you can put whatever in its <virtual> stuff and it will always stay there.

if you want your server to only answer on a specific IP / port, you have directives in your httpd.conf file for that:

(instead of listening and denying after, it will not even listen at first)


BindAddress *
Port 80


Replace the * with any ip, or part of ips to do what I described before... and for another port than 80, you guessed how to do it :)