Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
So seeing as how I bought a domain, I figured I'd better set up bind on my server so I can actually use it. Thing is, I know nothing about BIND, so I picked a tutorial that made decent sense and went with it. Sadly, it didn't seem to work... here are the results:
code dig zard0.us ; <<>> DiG 9.6.1-P2 <<>> zard0.us ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40865 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1 ;; QUESTION SECTION: ;zard0.us. IN A ;; ANSWER SECTION: zard0.us. 3600 IN A 68.178.232.100 ;; AUTHORITY SECTION: zard0.us. 3600 IN NS ns16.domaincontrol.com. zard0.us. 3600 IN NS ns15.domaincontrol.com. ;; ADDITIONAL SECTION: ns16.domaincontrol.com. 3600 IN A 208.109.255.8 ;; Query time: 313 msec ;; SERVER: 192.168.0.11#53(192.168.0.11) ;; WHEN: Wed Sep 29 15:12:05 2010 ;; MSG SIZE rcvd: 113
Edit: Its probably something to do with the IPs I put in, so if someone could take a look at 'em it'd be appreciated.
|
|
|
|
≡
|
2010 Sep 29 at 22:13 UTC
— Ed. 2010 Sep 29 at 22:16 UTC
|
|
|
|
I looked at the ips, can I be appreciated now?
|
|
|
|
≡
|
2010 Sep 30 at 00:37 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Hey supes, you stopped replying on messenger, and imma go afk for a bit so I'll ask you here.
Well, first of all the domain works now (goes to my router page from within my network though )
But now that I got that setup, I wanna get it set up for a subdomain. I'm pretty sure I know what to do, but I'll verify it with you before I go about making changes all over the place.
So, I wanna use the same concept as the email I made, and have the domain of my site be ha.zard0.us
Its also worth mentioning that I won't be using just zard0.us for anything, and want it to redirect to ha.zard0.us
So I'm pretty sure for my A records, it'd be:
Host: ha.zard0.us Points To: my ip
Host: zard0.us Points To: ha.zard0.us
Which would make ha.zard0.us point directly to my server, and would make zard0.us point to ha.zard0.us which would then point to my server... correct?
Or do I need to point them both to my ip, and use a redirect script on zard0.us that sends it to ha.zard0.us?
Then after that I edit "/etc/apache2/sites-enabled/default"
and add:
code <VirtualHost *> DocumentRoot "/var/www/ha/" ServerName ha.zard0.us <Directory "/var/www/ha/"> allow from all Options -Indexes </Directory> </VirtualHost>
Then put all my files into var/www/ha/
Yes?
|
|
|
|
≡
|
2010 Oct 13 at 00:54 UTC
|
|
|
|
That looks about right. You can have ha.zard0.us with an A record or a CNAME. It doesn't really matter.
CNAMEs are not redirects. CNAME just means "use the same IP" and generally tells people they are to be considered the same site. Like Google for instance.
Personally, I would configure Apache like this:
code <VirtualHost *> DocumentRoot "/var/www/ha/" ServerName zard0.us ServerAlias www.zard0.us ServerAlias ha.zard0.us <Directory "/var/www/ha/"> allow from all Options -Indexes </Directory> </VirtualHost>
and then use mod_rewrite or PHP to redirect everything to ha.zard0.us if it's not already.
|
|
|
|
≡
|
2010 Oct 13 at 01:12 UTC
— Ed. 2010 Oct 13 at 01:13 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Thanks man. I'll post back with results.
|
|
|
|
≡
|
2010 Oct 13 at 01:14 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Ok so this is how I have it set up:
On godaddy in the total DNS control panel
A said: Host: @ Points To: 97.121.168.14
Host: ha Points To: 97.121.168.14
CNAMES said: Host: WWW Points To: zard0.us
In my /etc/apache2/sites-enabled/000-default I have:
Quote: <VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost *>
DocumentRoot "/var/www/ha/"
ServerName zard0.us
ServerAlias www.zard0.us
ServerAlias ha.zard0.us
<Directory "/var/www/ha/">
allow from all
Options -Indexes
</Directory>
</VirtualHost>
As far as files/directories I have an index.html file in my var/www/ directory. If you go to zard0.us this file shows up, as expected. But, in my var/www/ha directory, I have a file called sprinkles.html ...if you go to ha.zard0.us/sprinkles.html it doesn't show up. Also if you go to just ha.zard0.us it brings you to the index.html file in the var/www/ directory.
Now, the way things are working, I could just completely get rid of the var/www/ha/ directory and put my site in the var/www/ directory. Only problem is, I want it so that if someone types in zard0.us it redirects them to ha.zard0.us
wat do?
|
|
|
|
≡
|
2010 Oct 13 at 04:54 UTC
— Ed. 2010 Oct 13 at 04:55 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost *>
DocumentRoot "/var/www/ha/"
ServerName zard0.us
ServerAlias www.zard0.us
ServerAlias ha.zard0.us
<Directory "/var/www/ha/">
allow from all
Options -Indexes
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^zard0/.us$
RewriteRule ^(..*)$ http://ha.zard0.us$1 [R=301] [L]
</IfModule>
</VirtualHost>
|
|
|
|
≡
|
2010 Oct 14 at 00:47 UTC
|
|
|
|
http.conf code NameVirtualHost mobile.sprinkles1435.us:80 <VirtualHost mobile.sprinkles1435.us:80> DocumentRoot "/var/www/mobile/" </VirtualHost>
000-default code <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> <VirtualHost *> DocumentRoot "/var/www/mobile/" ServerName sprinkles1435.us ServerAlias www.sprinkles1435.us ServerAlias mobile.sprinkles1435.us <Directory "/var/www/mobile/"> allow from all Options -Indexes </Directory> </VirtualHost>
I can't get it to work, and I don't know what I'm doing...
|
|
|
|
≡
|
2012 Jan 6 at 23:53 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Alright, well... don't try and copy anything you've read from when I was getting my shiz set up, cuz I was doing something different. On mine, I wanted to ALWAYS be using a subdomain, and have it redirect your TO the subdomain if you weren't there already. You want something different (a mobile version of the site) on your subdomain.
It's been over 9000 minutes since I last worked on this stuff, but I think what you need is:
code <VirtualHost *> DocumentRoot "/var/www/mobile/" ServerName mobile.sprinkles1435.us <Directory "/var/www/mobile/"> allow from all Options -Indexes </Directory> </VirtualHost>
|
|
|
|
≡
|
2012 Jan 7 at 00:26 UTC
|
|
|
|
|
|
|
|
≡
|
2012 Jan 7 at 01:06 UTC
|
|
|
|
Wait, no. Now sprinkles1435.us doesn't exist. It redirects everything to mobile.sprinkles1435.us.
|
|
|
|
≡
|
2012 Jan 7 at 01:09 UTC
|
|
|
|
So I changed it to:
httpd.conf code <VirtualHost mobile.sprinkles1435.us:80> DocumentRoot "/var/www/mobile/" ServerName mobile.sprinkles1435.us <Directory "/var/www/mobile/"> allow from all Options -Indexes </Directory> </VirtualHost>
It seems to work, but my phone says:
Data connectivity problem
The page contains too many server redirects.
|
|
|
|
≡
|
2012 Jan 7 at 01:13 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Hmmm... I'm pulling up the same page when I go to the subdomain as I am when I go to just the domain. Do you have a unique index page in the mobile folder, or did you just copy the index page from /var/www/?
|
|
|
|
≡
|
2012 Jan 7 at 01:23 UTC
|
|
|
|
|
|
|
|
≡
|
2012 Jan 7 at 01:40 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Well, mobile.sprinkles1435.us is pulling up the default "Hia! This website is brand fucking new!" page.
Guess you'll have to wait for supes or someone else to come along that actually knows what they're doing. Or, you know... keep Googling :D
|
|
|
|
≡
|
2012 Jan 7 at 01:48 UTC
|
|
|
|
So I determined that this does work. The problem is when I try to redirect the mobile device to mobile.sprinkles1435.us. If I omit
Then I can go to both the domain and subdomain.
Any ideas on a work around/fix?
|
|
|
|
≡
|
2012 Jan 7 at 02:13 UTC
|
|
|
|
Do you only have the one VirtualHost?
Shouldn't you have on for the Desktop version, and one for the Mobile Version?
If they are both just the same, the redirect is of course going to loop forever.
|
|
|
|
≡
|
2012 Jan 9 at 08:17 UTC
|
|
|
|
this has nothing to do with anything.
I drink to forget but I always remember.
|
|
|
|
≡
|
2012 Jan 9 at 10:09 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Oh shi-
Supes, you're the man, man. I didn't even realize he only had the one, I thought he was adding the new (mobile) one to the default one.
Edit: @Cloud - Is it really spelled Onix? I always thought it was Onyx :O
|
|
|
|
≡
|
2012 Jan 9 at 15:08 UTC
— Ed. 2012 Jan 9 at 15:09 UTC
|
|
|
|
Like this?
code NameVirtualHost sprinkles1435.us:80 <VirtualHost sprinkles1435.us:80> DocumentRoot "/var/www/" ServerName sprinkles1435.us <Directory "/var/www/"> allow from all Options -Indexes </Directory> </VirtualHost> NameVirtualHost mobile.sprinkles1435.us:80 <VirtualHost mobile.sprinkles1435.us:80> DocumentRoot "/var/www/mobile/" ServerName mobile.sprinkles1435.us <Directory "/var/www/mobile/"> allow from all Options -Indexes </Directory> </VirtualHost>
Because I can't get it to work.
Woot! Superjer+Google =
code <VirtualHost *:80> DocumentRoot "/var/www/" ServerName sprinkles1435.us <Directory "/var/www/"> allow from all Options -Indexes </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "/var/www/mobile/" ServerName mobile.sprinkles1435.us <Directory "/var/www/mobile/"> allow from all Options -Indexes </Directory> </VirtualHost>
It works!
|
|
|
|
≡
|
2012 Jan 9 at 17:05 UTC
— Ed. 2012 Jan 9 at 17:13 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
Lol... I went to go reply to your post, and I was reading it before you edited it. I was gonna copy/paste what you had and change the top 2 lines of your virtualhosts to what you have now... but when I went to quote it, they were already changed, and I was like... wtf?
But anyways, I can confirm it's working on my end as well :D
Now all you gotta do is put up a good collection of porn (remember to keep it pretty low-res on the mobile version) and everything should be good to go
|
|
|
|
≡
|
2012 Jan 9 at 17:34 UTC
|
|
|
|
Rockbomb said: Lol... I went to go reply to your post, and I was reading it before you edited it. I was gonna copy/paste what you had and change the top 2 lines of your virtualhosts to what you have now... but when I went to quote it, they were already changed, and I was like... wtf?
But anyways, I can confirm it's working on my end as well :D
Now all you gotta do is put up a good collection of porn (remember to keep it pretty low-res on the mobile version) and everything should be good to go
The attn button is so under rated.
|
|
|
|
≡
|
2012 Jan 9 at 18:52 UTC
|
|
|
|
Well good.
|
|
|
|
≡
|
2012 Jan 10 at 18:28 UTC
|
|
|
Page [1]
|