A place where the Joyent community can gather, help each other out, and stay informed.
You are not logged in.
How about we offer support to each other for how to best go about doing local development on various platforms? As we just saw with another MySQL fault on barclay, we developers need to focus on local development (and even testing, !) before putting applications live on a shared server.
Well, this was not the main intention for this post, but it turns out I do feel like we could benefit from an entire forum (maybe one for mac, the same or another for *nix, and one for windows?) towards helping each other with local development. We could also support each other with tips on how to keep optimizing for growth along with TextDrive's beautifully optimized servers. Does anyone else feel this would help?
On a more immediate note, if anyone's running a G5 and using Desktop Manager, the app appears to break after updating to the latest firmware (just released) for the G5. I'm now using VirtualDesktop, which works but is not as nice and isn't free. :(
Offline
Ok - I'm stumped. My local apache has stopped working, and I can't figure out why. The break occurred about the time I installed php5 from mark liyanage. at first I thought it didnt work because I had the php5 module loaded twice, but I took all of the Load and AddModule directive out of httpd.conf and it still won't work, this time I don't get any errors.
[kjell@imac:~] % httpd -v
Server version: Apache/1.3.33 (Darwin)
Server built: Nov 29 2004 14:12:57
Here's what I get trying to start it:
[kjell@imac:~] % sudo apachectl start
Password:
Processing config directory: /private/etc/httpd/users/*.conf Processing config file: /private/etc/httpd/users/joachimbjerke.conf Processing config file: /private/etc/httpd/users/vhosts.conf
/usr/sbin/apachectl start: httpd could not be started
My config files are valid. Where can I look to see why apache won't start? Anyone have any ideas?
Offline
have you looked at your log files? it'll say in error_log what's going on...
Offline
ahhh, why didn't I do that! You guys' help is turning me into a lazy sob:
httpd: could not open error log file /Library/Webserver/dev/railslog/apache.log.
fopen: No such file or directory
But now where on earth is it trying to open that from? I have two rails applications running out of /Library/WebServer/dev/rails, but there isn't a railslog folder... if I make the file apache wants it works just fine... Is there a rails.conf file somewhere which junks up where the log should go? My error_log is in ErrorLog "/private/var/log/httpd/error_log", and not the dev directory...
Offline
My main development environment is finally put together with Panther. mydomain.dev is convienently pointing to my site's local root, and apache/php/mysql is working peachy.
Now for PC testing. I've got a Win XP machine sharing my internet connection from Panther. Is there anyway to visit mydomain.dev and see my development site (on the Mac)?
Otherwise, I've made the switch to DNS Made Easy and would appreciate any tips on properly pointing alpha.mydomain.com to my local development machine. My net connection is a sprint DSL line. I'm not sure how to find the IP to point to my machine.
Which way is easier/safer for doing local development but being able to test the dev site on another computer (in this case Win XP)?
Offline
i use dyndns.org to not have to know my local cablemodem IP.
you could point alpha.mydomain.com to yourusername.dyndns.org and you're set.
there are clients for all platforms that constantly monitor your IP for changes and upload when they see one.
it's the most elegant solution - in terms of work for me.
it's not the most elegant in how it looks - since it's actually a dyndns URL.
but if it's just for you, then who cares, right?
Offline
otherwise, you have to update your dns yourself whenever it changes.
which is, by the way, for the birds.
Offline
trel wrote:
there are clients for all platforms that constantly monitor your IP for changes and upload when they see one.
This is a DynDNS client, to change your IP with them? Is DynDNS better than DNS Made Easy for this reason? Maybe there's a client also for DNS Made Easy?
Offline
cameron wrote:
trel wrote:
there are clients for all platforms that constantly monitor your IP for changes and upload when they see one.
This is a DynDNS client, to change your IP with them? Is DynDNS better than DNS Made Easy for this reason? Maybe there's a client also for DNS Made Easy?
Like one of these?
At DME you can even do it with something as simple as a http request to a certain url, so you can even do it from say, a shell script. Ofcourse, that means sending your password unencrypted in the url so it's not really adviced, but it's possible. :)
Last edited by Marten (2005-01-21 10:07:04)
Offline
from that page at dnsmadeeasy.com:
DNS Made Easy also supports SSL transactions. You can use this extra security by switching to HTTPS:
Code:
https://www.dnsmadeeasy.com/servlet/updateip?username=<email>&password=<password>&id=<id>&ip=<your new ip>
Last edited by trel1023 (2005-01-21 14:39:17)
Offline
And if you use this link when signing up with DNS Made Easy, you help support TextDrive as well as getting kick ass
Offline
So far these scripts are all using wget.
wget is not installed on OS X. I just tried installing it. But failed to make.
Other's are saying 'use fink'. Rather not. Should I?
Can someone help me change these wget commands to curl commands in this DME_update script:
$cmd = "wget -O /proc/self/fd/1 -q \"$getip_ext_url\"";
$cmd = "wget -O /proc/self/fd/1 -q \"$url?username=$username&password=$password&id=$id&ip=$new_ip\"";
Last edited by cameron (2005-01-21 18:06:14)
Offline
ryanschwartz wrote:
And if you use this link when signing up with DNS Made Easy, you help support TextDrive as well as getting kick ass
"If you build it, they will come."
-VC200, VCII, DMG- Plus, Premier
Offline
Fink is a package manager that simplifies installing a bunch of other littler things - it's not a utility like wget. I think if you want to install wget, the best way to do that is to use fink, but have you tried just changing the two wget's in the script into curls? I think they would both do the same thing, which is request a url which would then tell the server that your ip has changed and what it has changed too. Try it?
Offline
I did try just changing wget to curl. It's giving me a malformed curl request. I'll try some more though. This unix command stuff is not strong for me though.
I did install fink once before on another machine and didn't seem to use any of the apps/utilities. What else do you use from it regularly?
Offline
Well, I can now officially update my Dynamic IP with DNS Made Easy using a customized DME Update script. For someone new, I'll post the info below. This is for setting your dynamic IP address with DNS Made Easy on a Mac Panther.
-- Get wget and follow build instructions
-- Get DME Update script (there are others, but this one is more intentional and easy to add records)
-- Open config.pl from DME update:
$cmd = "wget -O /proc/self/fd/1 -q \"$getip_ext_url\"";
-- change to:
$cmd = "wget -O /dev/fd/1 -q \"$getip_ext_url\"";
-- and
-- change from:
# call the update servlet at DNS Made Easy
$url = "http://www.dnsmadeeasy.com/servlet/updateip";
$cmd = "wget -O /proc/self/fd/1 -q \"$url?username=$username&password=$password&id=$id&ip=$new_ip\"";-- change to:
# call the update servlet at DNS Made Easy
$url = "https://www.dnsmadeeasy.com/servlet/updateip";
$cmd = "wget -O /dev/fd/1 -q \"$url?username=$username&password=$password&id=$id&ip=$new_ip\"";Well, I hope that helps somebody else. Not friendly stuff here. But we're not after your everyday localhost'n dev environment either.
Anyway, you might then check out CronniX to keep a cron job for updating your Dynamic IP with DME regularly.
Almost a side note after that, but now it's a matter of opening up a crack in the firewall to allow the new IP to point to the local Apache2 instance, rather than default Apache1 and "web sharing" stuff. But hey, that's only if I can get through sprint's dsl and an airport extreme. Didn't someone write a tutorial yet for "setup dynamic dns for localhosting on mac os x with sprint dsl and airport extreme with additional apache2 build while still keeping firewall on and security tight -- in a nutshell"? I'd almost pay for one.
Last edited by cameron (2005-01-22 07:25:04)
Offline
this is useful too:
http://www.dnsmadeeasy.com/myip.jsp
Offline
Okay, so "myip" from an external perspective is the IP of my dsl router. This is quite dangerous at the moment because there is a web-based dsl setup thingy available to the world. How do I get to the server itself?
Offline
How does one enable web sharing for a new Apache2 instance, separate from the Apache1 shipped with Panther?
I'm using the Apache2/php5/mysql builds from Server Logistics.
Offline
Cameron, I don't use the SL packages, I built Apache2 and then sorta hammered on the instructions at the following link to make it work:
http://sean.typepad.com/ditto/2004/09/finks_apache2.html
Every time you bump the system you need to redo the process, I don't know if it's worth the effort or not. I suspect not.
Offline
Damelon wrote:
Cameron, I don't use the SL packages, I built Apache2 and then sorta hammered on the instructions at the following link to make it work:
http://sean.typepad.com/ditto/2004/09/finks_apache2.html
Every time you bump the system you need to redo the process, I don't know if it's worth the effort or not. I suspect not.
Yeah, I was half way there with this. Thanks for the link. For those using the server logistics builds of apache2, the above link does allow Panther to believe it is "web sharing" from your apache2. But the server logistics pref panel control of apachectl (start/stop) stops working.
Offline
cameron wrote:
Almost a side note after that, but now it's a matter of opening up a crack in the firewall to allow the new IP to point to the local Apache2 instance, rather than default Apache1 and "web sharing" stuff. But hey, that's only if I can get through sprint's dsl and an airport extreme. Didn't someone write a tutorial yet for "setup dynamic dns for localhosting on mac os x with sprint dsl and airport extreme with additional apache2 build while still keeping firewall on and security tight -- in a nutshell"? I'd almost pay for one.
I'm starting to wonder if this is even possible. Or worth it. The goal is to be able to test my dev sites with a win xp machine literally next to my mac dev machine. Without uploading to TextDrive first. Any other suggestions?
Offline
I'm probably missing something, so I apologize in advance if that's the case, but testing what? The CSS? The XHTML? If that's what you are referring to by development, then uploading to a .textdriven.com domain is probably just as fast as the next thing. If you are talking about building something (say in RoR) then I'm not so sure testing it on XP is needed. All you would be doing then is serving the wrapping to XP which is again the XHTML and CSS, correct? The idea is simply to build it locally and check it's working before uploading it to a production server (in this instance probably TD), correct?
Offline
Damelon wrote:
I'm probably missing something, so I apologize in advance if that's the case, but testing what? The CSS? The XHTML? If that's what you are referring to by development, then uploading to a .textdriven.com domain is probably just as fast as the next thing. If you are talking about building something (say in RoR) then I'm not so sure testing it on XP is needed. All you would be doing then is serving the wrapping to XP which is again the XHTML and CSS, correct? The idea is simply to build it locally and check it's working before uploading it to a production server (in this instance probably TD), correct?
Maybe you're right. The planned dev environment, now that I've got more than myself developing sites, is keep everything in a repository, build most sites with TextPattern, custom plugins, always test locally first (we've seen here why this is important), then move to TextDrive for production.
You're right, though. I want to test with the windows machine mostly for xhtml and css. It's just nice to be able to test the layout and design as a full-on TextPattern site, with PHP5, custom plugins, etc. dynamically before uploading to TextDrive.
Offline
This is the crazy thing about setting up the machine for local stuff. If the development is only for XHTML/CSS testing across platforms I don't know if there's any reason to bother with the Apache2 stuff (except as an exercise in geekness, of course). The default OS X setup is more than sufficient for platform compatibility (that is, serving up pages locally you can view on your XP or IE 4.0 or whatever floats the boat).
The Apache2 setup is only really useful if you are trying to write programs of some sort that you want to test before moving to a working and public server. Better to crash a machine with only one user instead of one with 300+
As I've stated though, I could be missing something.
Offline
Working towards the future, it's ideal to have a development server for any sizable project. My thinking is to have my mac box be the dev server. But maybe I'm better off setting up a second FreeBSD machine? It could also be off-site (and outside my DSL router/network), but far away from TextDrive and it's shared environment.
Unless I can figure out how to allow access to my mac machine safely, I think I start looking for such a dev server.
edit: or until I can afford a dedicated server, right? :)
Last edited by cameron (2005-01-23 11:48:19)
Offline
cameron wrote:
But maybe I'm better off setting up a second FreeBSD machine?
In my version of geek heaven, yes, I have a dedicated FreeBSD setup mirroring TD in total, just for giggles.
Offline
Damelon wrote:
cameron wrote:
But maybe I'm better off setting up a second FreeBSD machine?
In my version of geek heaven, yes, I have a dedicated FreeBSD setup mirroring TD in total, just for giggles.
Yeah, what plan is that? :)
At this point I'll settle for being able to test on IE win xp with it directly plugged in to my mac. And it works fine once personal web sharing is turned on. But for anyone trying this with a non-apple apache build on their mac, I could only get this to work with the help of the link D posted above. Email me if you need help with it.
Offline
Cameron, are you still having trouble with this? I think all you need is local DNS, or, at the simplest, to edit your hosts file on the windows box.
edit the file at c:\wins\system32\drivers\etc\hosts
add a line for your mac box for each dev site you want to show that you have set up as vhosts in apache:
192.168.1.10 siteone.dev siteone
192.168.1.10 sitetwo.dev sitetwo
...
assuming your mac is at .10
have you set something up like this on the mac so you can view the different vhosts?
you could also set up a local dns. the router I use, m0n0wall, lets you add names for local use in addition to the caching nameserver it provides...
Offline
Thanks kemmott -
I didn't need to mess with anything on the windoze side once the mac's web sharing was (tricked) on (thanks Damelon). Can visit www.siteone.dev or localhost of my mac apache2 dev server.
It's working rather nicely -- and sites are less of a crap shoot now with my windoze based clients. :)
Offline
Spam! ^
Offline