I have a django project that runs on a Linux server, and I've been working on it both on Linux and OS X. I've noticed that some of the pages are a bit off, to put it politely, in Internet Explorer, and so I checked out the subversion repository on Windows and tried to run a local server.
My media directory has symbolic links to all of the media from each different app, and obviously Windows doesn't know what to do with them. I could simply hard-copy or link everything manually in Windows, but then I wouldn't be able to check that in (since the site runs on a Linux server), so it'd be a pain in the neck.
What is typically done in this case?
Set up a configuration using httpd and mod_wsgi that has appropriate Alias directives for the static media.
you could also add some static.serve links in your urls.py for debugging purpose :
if settings.DEBUG:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)/?$', 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT, 'show_indexes':True})
)
quicker than setting up apache+friends on win32.
Instead, of running a server on Windows just to test for IE, you can run a server from on an IP that identifies your machine on your network. Just run
python manage.py runserver ad.dr.re.ss:8000
To find the (local) address of your machine, access your router logs to see who's connected (I'm sure there's a better way, but this worked for me).
Related
I've been here before and even wrote an article on how I was able to connect Coldfusion 2018 with Mac OS X Mojave, but since the upgrade to Mac OS X 10.15 Catalina, I haven't been able to get Coldfusion to work correctly on virtual hosts (ie. http://local.mylocalsite.com).
Goal: install Apache connector for Coldfusion so that I can run my dev site from within the /Sites folder like I would any other site.
Problem: Apache is working and I can access websites from the /Sites folder using the virtual host (ie. local.mydevsite.com), but although Coldfusion is running (I can access the Coldfusion Administrator), my computer does not seem to recognize that Coldfusion is supposed to run. I don't know if this is Apache or Coldfusion's responsibility.
What I've tried: I've tried using the GUI connector, as well as trying to confirm the settings via command line. I have XAMPP installed, which I believe that DesktopServer (an application by ServerPress) is relying on, but that's probably not relevant; but what I'm getting at is that I believe XAMPP relies on Mac's default installation of Apache.
I've also tried to go into every file that is referenced in any instruction document to determine if there is anything out of place. Part of my confusion is that there are many instances of some of these files and I'm not sure which one is active. Here are some of the files I've looked into:
/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
/Applications/XAMPP/xamppfiles/apache2/conf/httpd.conf
/Applications/XAMPP/xamppfiles/apache2/conf/mod_jk.so
/private/etc/apache2/httpd.conf
/private/etc/apache2/mod_jk.conf
/private/etc/apache2/extra/httpd-vhosts.conf
From what I can tell, the main settings for Apache are stored in the /private/etc/apache2 folder, but I want the XAMPP version of https-vhosts.conf because that's where DesktopServer is pulling their virtual hosts from. Regardless, I don't think it matters which vhosts file is being used because Coldfusion won't run on any of the local sites from my /Sites folder that are loading correctly when I visit local.anylocaldevsite.com.
Thoughts? This is either a really dumb question because no one else is asking it, or there aren't many Mac users who also use Coldfusion. Would love assistance if anyone has a clue. Thanks!
Update: This isn't an exact answer, but the recommendation to try CommandBox was a win. I installed CommandBox and then ran the "ColdBox" application in the root of my project and the site opened up in my browser like a gem. Wonderful. Thank you! I can call that the "answer" if no one objects, but I know that it's more of a workaround than an exact fix.
First, I guess I'd have to figure out if I'm running remotely and second I'd have to figure out whether my remote connection is a standalone remote app or an app running on a terminal server (that may be tricky).
But, once I've figured out all those awful things, is there a way to run a windows function like ShellExecute locally instead of remotely?
The reason I'd want to do this is because I launch a web browser to view rather high bandwidth things that require javascript and flash and certain sysadmins who administer our product aren't too keen on having to make unnecessary and insecure modifications to their terminal server farm.
Yes, if the clients are running Windows and you can install software on them.
See Remote Desktop Services Virtual Channels in MSDN.
There is a free tool that does exactly what you want. I got reference from TechNet forums, it's named Remote Executer from http://www.mqtechnologies.com
Good luck
I'm finding an non-daemon, interactive-mode only, portable(moveable) FTP server for Mac OS X.
Like MAMP.
This will be used temporarily for local development only. Not for service.
Just file listing and serving(download) features required. Complex features like account management or SSL are not required.
This should be run as an UI application, and should not depend on system setting. Whole server should possible to be moved with only folder copying.
Is there a solution like this?
Woof is a web not ftp server. Minimal and almost trivial to use. Depending on you use case it might work for you.
my project is a PHP web application. This applies to my test server (local), not production server! I am also the solo developer on this project (however, that may change in the very far future). Also, all my source code is committed to a repository and the production server gets the source code from the repository.
I do my development in Windows while my test server runs on Ubuntu (perhaps you can also recommend me another distro that is easy to use and can serve as a good web server). I need an elegant way to interface between the two environments. Currently, I do my coding in Windows and then FTP the changed files to the test server. However, this is quite cumbersome and tedious since I have to manually go to my FTP client each time. Suggest me something elegant please! Perhaps FTP sync? or OpenVPN (where the root www directory on test server is acts like a folder in Windows)? Thanks for your awesome time!
Easiest would be in Ubuntu, right click a folder then click "Sharing Options", then share the folder. In Windows, connect to the share, and work on that copy.
If you're using version control, using continuous integration like Hudson ( http://hudson-ci.org/ ) would help if you create a task that builds/exports the website for the testing server. This approach would be better in the long term, but you'll waste a day setting it up initially.
I prefer SFTP to FTP.
That said, ExpanDrive lets you map SFTP servers to local drive letters, which then means you can use any text editor to access your files directly on the test server, or use other mechanisms to keep the files in sync. Since they show up as two local drives, you can use just about any product out there.
If you want to use FTP, you can just map the drive in Windows Explorer. If you open up My Computer, then go to Tools > Map Network Drive, you can map a FTP server folder to any local drive. Just type in the address as the folder, ie. ftp://mscharley#192.168.0.10/htdocs
This will atleast save you a trip to the FTP client...
Is there any reason you couldn't just test on your local computer? At my job, we all develop and do developer testing locally, most of us using Windows. Our production and test servers are all linux based. Working locally is really nice, because you don't need to worry about making changes on the server with every small change.
Another option would be to create a checkout or working copy of your code on the server, and then run svn up or svn export (or equivalent using your version control software) each time you change the code on the server (assuming you are sshd into the server). This is kind of slow, but it's easy. The other option would be to write a script that goes through the svn logs for the recent commit and only exports or updates the ones that changed. This is much faster, and for all I know, there is already something out there that this.
Finally, some IDEs allow you to edit files live over ftp\sftp. Basically the IDE downloads a copy of the code and then reuploads it when you save.
Currently I develop on windows (PHP) as well and deploy on a Linux box for testing and production. This is how I do it.
Set up a local development server with e.g. WAMP.
Set up your code base in version control, e.g. Subversion.
Checkout your code base onto the testing/staging server, not just only on your local dev. environment.
In the early stages of development you want to deploy to the testing environment A LOT to sort out any discrepancies between your windows and linux environments. When your programming efforts turn more into program flow type programming this constant testing will probably slow down. But still take the effort to test on a regular basis.
To test your code base on staging do an svn update. I just log in with an SSH session to do this. A key thing here to note is that you do not have to make any config changes to your code base. If you do need to make config changes to your environment on staging it worth while spending the time to SCRIPT this process rather than this being a manual process.
Do the same for production. I use an Subversion check out on production as well. Make sure you set you .htaccess file to deny access to your hidden .svn folders and script the deployment especially if there a config changes necessary.
Some ideas:
Use a server environment under windows (e.g. EasyPHP).
Use a development tool that can save over FTP (e.g. ultra edit).
Use a network drive connected to the remote machine via FTP.
Use a network drive connected to the remote machine via Samba.
Run a linux distro inside a virtualization tool (e.g. virtual box) and write from the windows host to a share directory of the guest host.
Use dropbox to sync files between machines (there is more a hack than an "enterprise" solution).
I am developing some Python programs that I'm running on a remote Ubuntu Linux server (hosted on Slicehost). I would like to work on the source in an IDE on my Windows Vista PC, and have all file modifications sent directly to the Linux box without my intervention (i.e. without having to manually SFTP the files each time I change them). What is the very easiest way I can do this?
WinSCP includes a basic remote file editor, though if you want to use a proper IDE for your development this won't be much help.
I'd suggest you run a version control system like subversion, which would allow you to write a post-commit hook to automatically rsync your code the server with each commit.
Use PuTTy and SFTPDrive.
PuTTy is an SSH client, and SFTPDrive ($39 USD) will allow you to mount your remote file system locally as a drive letter.
Install Samba and OpenVPN on the server, and OpenVPN on the client. Setup Samba to share the directory tree you're interested in, and access it over the VPN for security. Perhaps Vista has non-sucky WebDAV support by now, and you could use WebDAV over HTTPS, but it was always crap under XP.
Ben's suggestion of a local dev environment using a VM is also a winner.
You could install cygwin and then have rsync run on cron every minute.
Or you could use Netdrive to access the server via FTP like a local disk:
http://tech.xptechsupport.com/netdrive-turn-your-ftp-into-a-drive-letter.html
Or you may be able to achieve something similar using cygwin and FUSE - you can on linux, but never tried it on cygwin.
Also, would it not be easier to set up a full dev environment locally? Maybe using a virtual machine? It'll be much quicker for testing. And then you can set up a shell script to transfer the current version to the slicehost server.