LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to find sub-domain? (https://www.linuxquestions.org/questions/linux-software-2/how-to-find-sub-domain-383683/)

unix20009876 11-16-2005 10:12 AM

how to find sub-domain?
 
I created a sub-domain, say: www2_mine_com,
http : / / ww2_mine_com/index_html is in directory
public_html/www2/index.html.

I am wondering how http server finds the page: which (symlink) file contains redirection info?

thx

(_ = . above)

unix20009876 11-16-2005 10:41 AM

subdomain, http and redirection
 
for browser to:
http (://) subdomain_mydomain_com/index.html

the page is actually in directory:
public_html/subdomain/index.html

I am wondering how http server finds the page, there must be a redirection file (maybe symlink file), but wher it is?

thx

(_ = . above)

unix20009876 11-16-2005 05:30 PM

how to know if a directory is normal one or subdomain?
 
there are 2 directiries under public_html directory:

public_html/images
public_html/pictures

"images" is a normal directory (uploaded by ftp) and "pictures" is a subdomain (created in cPanel).

if using cpanel, I know "pictures" is subdomain because it is displayed as subdomain in cpanel.

but:
How can I know a directory is subdomain programmatically? I mean, kowning it from C++ program, I am sure that there must be info about subdomain stored in some files, do you know the info files? where are they?

If I know the info files, i may read subdomian info from them by c++.

Finlay 11-17-2005 02:47 AM

you need to make a virtual host

jtshaw 11-17-2005 06:18 AM

Merged a few similar threads together.

Finlay 11-17-2005 10:57 AM

if you are running apache then look in the httpd.conf file for a virtualhost section


All times are GMT -5. The time now is 03:47 AM.