Symlink With Wildcard Subdomains
Jun 28, 2007
I'm trying to create a symlink (ln -s) in SSH with the goal of having a php-file to be able to be reached from my wildcard subdomains "username.domain.com". The reason is because of XMLHttpRequest that resides in the php-file. When trying to access it from username.domain.com I only get an error, because of the cross-domain issue.
Anyway, I got the suggestion of creating a symlink on the file system, but I can't really get the symlink right... Where should I place it on the file system?
This is the path to the script;
Code:
/home/web2753/domains/domain.com/public_html/ajax/status.php
I tried creating the symlink in various places, like in the /domains/ directory;
Code:
ln -s /home/web2753/domains/domain.com/public_html/ajax/status.php
But I don't seem to get it right! If I have understood everything correctly, I'm supposed to create a symlink for status.php so the Subdomains can access it as if it was placed directly under the subdomains.
This is what my .JS file looks like (with the XMLhttprequest, this might not matter..?)
Code:
/home/web2753/domains/domain.com/public_html/javascript/edit.js
Code:
var cururl = 'htp domain com'; // this forum didn't like this url?
function createRequestObject() {
var req;
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
} else {
alert('Problem creating the XMLHttpRequest object');
}
return req;
}
function handleDivTag(divtag) {
var divtag;
return divtag;
}
var http = createRequestObject();
var divhandler = new handleDivTag(null);
function sendRequest(ua_id,show,series) {
http.open('get', cururl+'ajax/status.php?ua_id='+ua_id+'&show='+show+'&series='+series+'&dummy=' + new Date().getTime());
http.onreadystatechange = handleResponseTwo;
divhandler.divtag = ua_id;
http.send(null);
}
function handleResponseTwo() {
if (http.readyState == 4 && http.status == 200) {
var response = http.responseText;
if (response) {
document.getElementById('editinfo'+divhandler.divtag).innerHTML = response;
}
}
}
Everything works except of the cross-domain issue which I'm trying to overcome by creating a symlink.
View 1 Replies
ADVERTISEMENT
May 7, 2007
I've set up the affiliate manager from jrox.com for a client of mine. This includes the setup of wildcard DNS so that each affiliate can have username.clientssite.com and have it count their clicks - which works properly.
What isn't working properly is that he also has forums.hissite.com, which is loading the main website page instead of his forums. He is using cpanel to add the subdomain, and it isn't failing, so I'm not sure what's going on with it.
Here is the relative section from the httpd file.
Quote:
<VirtualHost 74.53.106.146>
ServerAlias residualvictory.com
ServerAlias *.residualvictory.com
ServerAdmin webmaster@residualvictory.com
DocumentRoot /home/residual/public_html
BytesLog domlogs/residualvictory.com-bytes_log
ServerName www.residualvictory.com
User residual
Group residual
CustomLog /usr/local/apache/domlogs/residualvictory.com combined
ScriptAlias /cgi-bin/ /home/residual/public_html/cgi-bin/
</VirtualHost>
<VirtualHost 74.53.106.146>
ServerAlias www.forums.residualvictory.com
ServerAlias forums.residualvictory.com
ServerAdmin webmaster@forums.residualvictory.com
DocumentRoot /home/residual/public_html/forums
BytesLog domlogs/forums.residualvictory.com-bytes_log
ServerName forums.residualvictory.com
User residual
Group residual
CustomLog /usr/local/apache/domlogs/forums.residualvictory.com combined
ScriptAlias /cgi-bin/ /home/residual/public_html/forums/cgi-bin/
</VirtualHost>
And the bind file for his domain
Quote:
; Modified by Web Host Manager
; Zone File for residualvictory.com
$TTL 14400
@ 86400 IN SOA ns1.lucidic.com. root.lucid.lucidic.com. (
2007050705
86400
7200
3600000
86400
)
residualvictory.com. 86400 IN NS ns1.lucidic.com.
residualvictory.com. 86400 IN NS ns2.lucidic.com.
residualvictory.com. 14400 IN A 74.53.106.146
localhost.residualvictory.com. 14400 IN A 127.0.0.1
residualvictory.com. 14400 IN MX 0 residualvictory.com.
mail 14400 IN CNAME residualvictory.com.
www 14400 IN CNAME residualvictory.com.
ftp 14400 IN A 74.53.106.146
forums 14400 IN A 74.53.106.146
www.forums 14400 IN A 74.53.106.146
* 14400 IN A 74.53.106.146
View 10 Replies
View Related
Aug 25, 2008
"Do you support wild card sub-domains?"
a web host has sent me the following:
"Wild card sub-domains will not work with our standard shared hosting accounts. although the DNS configuration is available to have any sub domain not listed direct to an IP address the actually hosting account will not recognize a wild card DNS entry unless you have manually added the specific name of the sub domain."
The only part I understood was the first line. Maybe it is my lack of hosting related knowledge or maybe because English is not my native language, the second sentence is very confusing to me.
What is tech rep trying to say?
View 12 Replies
View Related
Jul 11, 2015
I have viewing the city names in my website like the following structure - [URL] ....
Here is the ,htaccess code - RewriteRule ^([^/]*)/([^/]*)/$ city.php?state=$1&city=$2 [NC]
But actually, I'm looking for to use wildcard subdomains that will rebuild the city names like the following structure-
city.mydomain.com/state/
I just need the htaccess rewrite code.Â
View 1 Replies
View Related
Jan 5, 2009
I have a site hosted at Godaddy.
My hosting account is shared delux.
I have recently added multi blogger Wordpress MU.
A single main blog is working fine but all other blogs are showing errors.
I have installed for subdomains.
View 1 Replies
View Related
Jan 3, 2015
System: Plesk Panel 12, updated on CentOS 6
Situation:
"Main-domain" domain with 2 "alias-domains" (301-forward). For "Main-domain" I created a wildcard subdomain. All works fine.
ToDo:
I want to create wildcard domains for both "alias-domains".
Problem:
It is not possible to create wildcard subdomains for both "alias-domains".
1. How to create wildcard-subdomains on "alias-domains"?
2. How do I disable Plesk to respond to every domain, which isnt covered by a wildcard?
View 6 Replies
View Related
Aug 15, 2008
i have big problem all Forums in my server hacked by perl symlink see all config.php by shell perl in .txt by include
i solve it by make perl permission 000 but all thing in cpanel stop cause cpanel by perl
View 6 Replies
View Related
Jul 5, 2009
I’ve been working on a project for weeks and I can not solve this, hope you can give me an idea. I am working on a dedicated server, and I need to create some symlinks between different accounts and users...
Both accounts are on the same partition of the server (home) and I have root access and SSH access for everything.
If I create a symlink to a directory of another account and on that directory there is any HTML file (e.g. Index.html), that symlink works great and it shows the content on that file.
HOWEVER if the symlink targets to a directory in which there is a file in (e.g. Index.php) or any script programmed in PHP (e.g. Joomla) it does not work and gives...
“Internal Server Error” + Additionally, a 404 Not Found error was encountered...
When I go to Cpanel the “error log” says...
[Sun Jul 05 09:15] [error] [client zz] File does not exist: /home/zzz/public_html/ 500 shtml
[Sun Jul 05 09:15] [error] [client zz] SoftException in Application.cpp:367: Mismatch between target UID (123) and UID (123) of file "/home/zzz/public_html/my-dir/my-symlink/ index php"
However, If go to SSH and edit server owner of the symlink, so both symlink and target file has the same owner (chown user:user directory_name) the problem is the same, but on the “error log” the UID Mismatch disappear and I only find...
File does not exist: /home/zzz/public_html/500 shtml
I’ve also tried modifying suexec by changing... “domain . tld ” for “domain - tld ” on the server alias, and does not work.
Here I give you more info about server file structure...
serveralias generation path...
/var/cpanel/userdata/USER/DOMAIN
suexec location...
/usr/local/apache/sbin/suexec
Server Information
System Linux
Apache Version 2.2.11 (Unix)
PERL Version 5.8.8
PHP Version 5.2.8
So the question is... HOW can I create a symlink between different users on the same dedicated server partition, that target to PHP scripts or how can I allow the server to execute PHP scripts through symlinks of different accounts?
View 2 Replies
View Related
Jun 29, 2008
A client hacked another client of mine using the following Perl code:
#!/usr/bin/perl
symlink ("/home/john/public_html/config.php","/home/carole/public_html/forums/includes/config.php");
After the hacker got the DB name, username and password it's very easy to change anything in the forum using PHP.
I'm using cPanel.
View 1 Replies
View Related
May 12, 2015
I installed Apache2. In the the folder "var/www/html" I created a symlink to a different HDD that holds a number of movie files. My thinking is that it would be easy to access the movies through a browser from any computer on my local network.
I used the following command string while in the html directory, and created the symlink:
ln -sd /media/guy/movie1/Movies test
While sitting at the server, when I click on "test" it opens the correct directory and exposes the files. If I surf to apache from another machine it does not show the symlink.
Here the permissions on the symlink
lrwxrwxrwx 1 root root 24 May 11 19:56 test -> /media/guy/movie1/Movies
Excerpt from Apache access log:
192.168.1.158 - - [12/May/2015:08:40:07 -0400] "GET /favicon.ico HTTP/1.1" 404 502 "-" "Mozilla/5.0 (X11; Linux i686; rv:24.7) Gecko/20140802 Firefox/24.7 PaleMoon/24.7.1"
192.168.1.158 - - [12/May/2015:08:40:07 -0400] "GET /favicon.ico HTTP/1.1" 404 502 "-" "Mozilla/5.0 (X11; Linux i686; rv:24.7) Gecko/20140802 Firefox/24.7 PaleMoon/24.7.1"
192.168.1.158 - - [12/May/2015:08:40:07 -0400] "GET /favicon.ico HTTP/1.1" 404 502 "-" "Mozilla/5.0 (X11; Linux i686; rv:24.7) Gecko/20140802 Firefox/24.7 PaleMoon/24.7.1"
192.168.1.158 - - [12/May/2015:08:50:38 -0400] "GET / HTTP/1.1" 200 584 "-" "Mozilla/5.0 (X11; Linux i686; rv:24.7) Gecko/20140802 Firefox/24.7 PaleMoon/24.7.1"
192.168.1.158 - - [12/May/2015:08:50:39 -0400] "GET /icons/blank.gif HTTP/1.1" 304
View 1 Replies
View Related
Apr 29, 2007
Code:
$ md5sum sim-current.tar.gz
6c1cece6f3af87598c4bdb09cabcb3cc sim-current.tar.gz
Line 25, file: sim-2.5-3/setup
Code:
TMPS="/tmp/sim_cj"
Line 399, file sim-2.5-3/install/sim
Code:
cat $TMPS >> /etc/crontab
If a local user creates a symlink to that file, then writes to the sim_cj file being linked to, as SIM is being installed, they can influence the contents of /etc/crontab.
Contacted the vendor via email on 04/17/07, email bounced.
Opened a ticket via their helpdesk ~5 days ago, no response.
Again, this is only an issue during the install, which is an extremely small window of time. Any bug that could lead to root access should be fixed, however.
View 0 Replies
View Related
Aug 4, 2008
I am starting to notice a range of IPs I'd rather not have access to any portion of my server's existence.
Can I add them to: /etc/apf/deny_hosts.rules
in this fashion:
12.34.567.
(This would effectively ban anyone whose IP began with these digits, regardless of what the last bracket's # is)
Possible?
I'd test, but my IP does not reset so frequently and I don't want to lock myself out of the server if it ends up working.
View 6 Replies
View Related
Jul 21, 2008
I run a free hosting service where users can sign up for a free blog.
With wildcard DNS and A entry, the users that sign up for a blog get the addy: theirblog.mydomain.com
This all works but there is no scalability. I have reached the limit of what my server can take.
If possible I would like to run multiple servers with just one domain.
So that when server 1 reaches its limit, it is possible to sign up new users that gets theirblog.mydomain.com (same domain) but now its physically stored on server 2.
Is this possible if you use wildcard DNS for the users subdomain sites?
I am quite new at this. I know there are ways to manage one domain on several servers, but is this possible too with this setup using wildcard dns and subdomains?
View 5 Replies
View Related
Jan 12, 2007
I bulk register .com names for future use, and out of all the ones I use, only about 30 have actual sites, whilst I have about 200 that are just not doing anything.
I have seen places like godaddy who whatever website people visit just gets fowarded to a landing page, and I have set it up so the nameservers all foward to my dns servers (I manage my own infrastructure).
I have seen through IIS it is possible to have a "catch all" website where any traffic goes there, however, how do I set this up in DNS?
I tried creating a zone called .com but that didnt work! and I really dont know what I should do!
View 6 Replies
View Related
Jul 6, 2007
Quote:
tar -zcvf sqldata.$date.tgz *.sql
As it seems the server is taking that * as a character, not as a wildcard.
What would be the proper character for a wildcard symbol?
View 7 Replies
View Related
Feb 22, 2007
Does anyone know.. if you have a wildcard ssl cert for *.domain.com meaning you can use anything.domain.com can you also use anything.anything.domain.com (ie. unlimited subdomain levels) ?.
View 1 Replies
View Related
Apr 22, 2009
So setting up wildcard DNS was easy enough, but I am trying to actually have wildcard *.*.mydomain.com
Is there any way to accomplish that, not having to add an entry for each *.actualsubdomain.mydomain.com ?
View 6 Replies
View Related
Nov 6, 2009
I have a server: serverA.maindomain.com
and another serverB.maindomain.com
The DNS records for maindomain.com are on serverA
so the serverB A record is on serverA which is fine (i am aware it's a risk if serverA goes down).
If I'm setting a sub domain of serverB such as site1.serverB.maindomain.com I have to setup an A record on serverA for the subdomain and I don't want to have to do this every time.
Is there anyway I can setup a wildcard A record for subdomains such as:
*.serverB.maindomain.com
View 0 Replies
View Related
May 14, 2008
Now that I have relieved a lot of frustration I can talk about my issue. We have a cpanel server and are trying to install a wildcard ssl certificate on it. As you could tell from above its not working out so well.
The cert was ordered an installed as *.domain.com . It works great on https://domain.com and [url]
However, when I do [url]its an epic fail. Its a seperate cpanel account even with its own dedicated IP address. I look in the httpd.conf file and see the :80 entry however, I need to add a :443 entry in a way that cpanel/whm will not change it next time i add an account.
When I try to install the SSL certificate in WHM on jeff.domain.com it tells me the domain does not match. So I am asking how do I get this to work? I have searched for quite a while on the net and have not come across anything that works.
View 10 Replies
View Related
Jan 8, 2008
Googlebot is eating up about 30GB bandwidth per month.
I want to prevent him (and other robots) from spidering:
[url]
and all derivatives thereof (e.g. [url])
Is this possible with robots.txt? How would the code look?
Will this work?
User-agent: *
Disallow: /directory1/page1.php
or do I need to somehow specify a wildcard, e.g.
User-agent: *
Disallow: /directory1/page1.php?*
View 1 Replies
View Related
Aug 30, 2008
I have [virtually] unlimited number of subdomains on my site, and I need SSL support on them. So, I think wildcard SSL certificate will do the job.
Can you recommend an affordable wildcard SSL cert provider supported by all the major browsers (IE/Firefox/Opera/Safari)?
View 13 Replies
View Related
May 18, 2007
one of my customers asked me if i can enable the WildCard DNS for him on Apache.
i just want to know is it any security issue with this if i enable it? can it be a security problem for my server if i enable it?
if not, how can i enable it?
View 4 Replies
View Related
Jun 23, 2007
I am not that much of a dns/server expert, and I really need help setting up wildcard dns for domain names.
I have 1 parent domain zone file. Let's name this domain "parentdomain.com". Now this domain is set up with private nameservers of ns1.parentdomain.com and ns2.parentdomain.com and everything works fine.
What I want to do is now have the ability to put ns1.parentdomain.com and ns2.parentdomain.com into any other domain on the web and make it forward to this Parentdomain.com web root.
How do I do this WITHOUT adding a zone file for each of these individual child domains?
The thing is that I have a project where I don't know which domains will have nameservers set to ns1/ns2.parentdomain.com, but I want them all to forward to the appropriate directory.
View 7 Replies
View Related
Mar 16, 2007
got the VirtualHost entries for Appache, so each Domain points to a folder.
The (Windows-)DNS runs on the server, means i have to create a new DNS Reverse-Lookup and Folder for each Domain seperatly, but this workflow appears to be pretty stupid..
Now my question:
Anyone can tell me how to setup somwhat a "Wildcard / Catchall DNS", and also "Catchall VirtualHost", so each Domain is automatically pointed to the right folder? Any scripts needed for that?
View 4 Replies
View Related
Jun 16, 2005
I have a virtual dedicated server (Red Hat) at GoDaddy and I'm trying to set up wildcard DNS. In short, I want:
anything.mydomain.com/thepage.html
to resolve to:
mydomain.com/thepage.html
I've taken the following steps: ......
View 1 Replies
View Related
Oct 17, 2009
I'm working on the idea of an email wrapping/branding service.
I'd like someone to be able to send an email to the service structuring the email address like this:[url]
The part in italics is the real destination and the part in bold is the address of my server.
I'll then parse the real destination out of the email, wrap it in some stuff and send it on.
From what I've read I need to set up a wildcard MX record. I've tried that but the emails just don't seem to get there.
I'd value your thoughts on how to deal with this problem and what questions I should be asking.
View 1 Replies
View Related
Nov 26, 2008
I am setting wildcard nameservers that are meant to resolve any dpim pointed to them. I need for my domain parking service.
I was able to set wildcard A records with BIND, and this is good. However, some registrars seem to look for the SOA records, and it seems that BIND doesn't allow creating such records. Therefore, I need to switch to another DNS software, but I can;t find any that supports wildcard SOA records.
View 2 Replies
View Related
Aug 11, 2008
I want to use wildcard subdomain
This is what I should do for my job
now how can I do it?
I use LXADMIN and lighttpd
lighttpd support .httaccess? how can I enable it?
View 4 Replies
View Related
May 14, 2008
I've just got a new server with WHM/cPanel. I was upset that after I installed my *.example.com wild card SSL cert successfully that it didn't operate how I expected.....
View 3 Replies
View Related
Jul 19, 2008
I want to wild card subdomain redirection
I want to like this when anyone type *.mydomain.com to will redirect to
[url]
how can i do this.
I have create A record for *.mydomain.com and also add in serveralias www.mydoamin.com mydomain.com *.mydomain.com
View 6 Replies
View Related