OSX Server mountain lion Run python web app wsgi

I'm using OSX Server.app of mountain lion. I want to run python web application on my Server.
How can I add wsgi application to my Web sites?
I think I must edit /Library/Server/Web/Config/apache2/httpd_wsgi.conf and /Library/Server/Web/Config/apache2/webapps/com.example.mywebapp.plist.
How should I edit these files?

Server.app already includes the mod_wsgi module and a default mod_wsgi webapp example at /Library/Server/Web/Data/WebApps/hello.wsgi. It's best to leave these as-is and duplicate the files to add additional sites just in case you mess up the config.
Decide where to store your site preferably in the Sites folder. You are right about editing the files you mentioned, however copy and rename them to something like httpd_wsgi.maasaamiichii.conf. Edit that file to set your own WSGIScriptAlias, for example
WSGIScriptAlias /WSGI /Users/maasaamiichii/Sites/WSGI.wsgi
Also edit the .plist file changing 3 keys to your own stuff to match the .conf file. This file should be edited in XCode and remember the ownership has be root:wheel 644 to run. After adding these files you may need to restart the server and/or Server.app.
Next edit the file at /private/etc/hosts to include an entry like
127.0.0.1 maasaamiichii.dev
This so your browsers know the domain is on your devbox machine.
With these steps done, open the Server.app and select Websites in the sidebar. Invent a website name, let's say maasaamiichii.dev is your devbox name and maasaamiichii.com is your internet name. Path needs to match the WSGIScriptAlias path above. Select "Advanced Settings" and enable the middle 3 options (htaccess, folder & cgi). In the bottom box select the Python WSGI webapp to run on that site. Save and you are finished. Back on the front window you can see your website by clicking the lower right corner link.
Please note that the default mod_wsgi as included at
/Applications/Server.app/Contents/ServerRoot/usr/libexec/apache2/mod_wsgi.so
runs the included Python version 2.6? and as such is outdated. Python 3 scripts may not run without custom building mod_wsgi. In addition, the included mod_wsgi is built for "embedded mode" and so the example script forgets all data between threads. To make it remember values persistently the module needs to be compiled for "daemon mode". So depending on what your purpose is for this website, the default config may not be enough persistence.

Similar Messages

  • Where can I find the download for Mac OSX Server Mountain Lion ?

    Where can I find the download for Mac OSX Server Mountain Lion ?

    On the App Store. Search for it:

  • Is there a plain English guide to sharing iCal Calendars via OSX Server Mountain Lion?

    Is there a plain English guide to sharing iCal Calendars via OSX Server Mountain Lion? The present documentation is very limited and of no assistance to a beginner like me.

    I don't have a domain set up on OSXServer  I just have server.myserver.private. I have no mail services at server.myserver.private. I uses [email protected] (a different server)  as the email address in the setup process.
    When I go to share the calendar it requires a valid email address, rather than [email protected], so I enter my email address as a test, I try many other email addresses too but the server responds with an error stating " (email adress) was not recognized by the server.  A new invitation has not been sent.

  • How to deinstall OSX Server Mountain Lion

    Hello togehter,
    ich want to deinstall my OSX Server Mountain Lion from my MBP. Which way ist the best way to do this? Can I drop the Icon to the Paperbasket. And that´s all? Or what shall I do. Please help me.
    Thanks
    Michael

    That should do it, but make sure that all of the Server
    services are shut down before doing so.

  • Erase and reinstall OSX server (Mountain Lion)

    I would like to do an erase and reinstall of my Mac Mini Server (Fall of 2011) that now has Mountain Lion on it.  I have data on the second drive but would like to erase the primary drive and reinstall mountain Lion and mountain Lion server.
    Is this possible, and if so would you point me in right direction for instructions to do this?
    Thank you

    Just hold down Command-R during startup,
    From there use disk utility to erase the primary drive then use the reinstall option to load up a fresh copy.

  • I'm running Yosemite on my present computer, if I buy a new computer with Mountain Lion, can I transfer apps and info?

    I'm using Yosemite now, new computer comes with Mountain Lion, can I transfer apps and info?

    You can, but there is a high risk of leaving OS X in your new Mac unusable. This is because Migration Assistant will detect that your new Mac has got preinstalled apps with an older version than the ones you have in the "old" Mac, and it will try to replace them. However, the new apps versions are designed for Yosemite, so you will not be able to open any application.
    Because of that, I recommend you to set up the new Mac without transferring your data, and upgrade it to Yosemite. Then, use Migration Assistant to transfer your files.

  • How do I configure OS X Server (Mountain Lion) to deliver mail from another domain to my mailbox?

    How do I configure OS X Server (Mountain Lion) to deliver mail from another domain to my mailbox?
    I run a personal Server at my office. It's configured under my own domain as server.mydomain.com. It's setup that it properly receives and sends e-mail for mydomain.com. I use my own mailbox [email protected] to get all my personal mail.
    I'm looking to add another domain as a secondary way for people to get to my content and information.
    I want the same address [email protected] and [email protected] to arrive in the same mailbox at my server.
    How do i do that?

    it does look like you can add virtual domains in the GUI of Server.app on at least some versions, but I don't have an OS X Server 10.8 version handy to check.
    I'd encourage spending some time to learn the command line.  In general, the payoff for learning the command line will be worth the effort expended.  You're running a mail server here and sooner or later the capabilities of the GUI will fail you.  This whether due to a configuration omission in the GUI itself, or due to the need to troubleshoot a malfunctioning mail server, a need to automate one or more of the Postfix-related sequences, or some other IT-related task.  Entirely FWIW, of course.
    Here's a cut-and-paste of the sequence just used to test the command line access to the Postfix configuration, first fetching the current value, appending example.com as the second domain, then displaying the new value, then restarting the Postfix server.  Don't enter the dollar signs; just the postconf command and following.  Adjust example.com to match your domain...
    $ postconf mydestination
    mydestination = $myhostname, localhost.$mydomain, localhost
    $ sudo postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost, example.com'
    Password: {your admin password here}
    $ postconf mydestination
    mydestination = $myhostname, localhost.$mydomain, localhost, example.com
    $ sudo postfix reload
    The Postfix and Postconf commands work irrespective of the OS X Server version; the tools reference the data files as needed.

  • HT2476 does mountain lion have remote desktop app?

    Hi does anybody know if Mountain Lion has remote desktop app included. if not how do you get it ?

    Hmmmmm... OK y'all have got me thinking.
    I normally run disk check and repair, this time it found a number of files and links related to printers and image devices, stuff that isn't likely part of the issue.  There were three links, however, related to core graphics.  the permissionss were  rwxr-xr-x when they should be rwxrwxrwx.  I don't think those are involved, but alas they are fixed.
    It seems like much of my issues seems to revolve around the mounting/access of resources outside my laptop, be it icloud, nfs server, samba server, etc. RIght at this moment, Finder is hung hard.  I tried to force restart it, and in the Force quit menu I now see two Finders.  One will kill and restart immediately, one does nothing.   And I can't open a finder window period. 
    In fact, just before writing this, I was attempting to edit a text document in StarOffice, and StarOffice went to lunch trying to access my samba share.  Now before y'all go nuts about any samba server side issues, let me say that while my MBP is having issues accessing my samba shares, none of my other computing devices are.  W7 laptop pulls up samba file system as fast as if not faster than it's own local file systems.  My other MBP (older core2 duo, but still on mountain lion) does not seem to have any issues.  I don't believe it a server side issue.
    So I asked myself, what's different on my 2.66 gb i7 MBP??  It just occurred to me that I have one piece of software that's pretty deeply rooted in file system management....   Tuxera NFS.   I see that it has not been updated since updating to Mountain Lion, so I am going to check that out, and will post results.

  • Purchased OSx 7 Mountain Lion on May 31st. After a virus in October

    Purchased OSx 7 Mountain Lion on 5/31/13. After a virus in October & system wipe, I'd like to re-install without having to re-purchase. It was sent as an online update, so I don't have a disc (or the original e-mail, due to the virus). Couldn't restore e-mail from backup...

    It was sent as an online update, so I don't have a disc (or the original e-mail, due to the virus)
    It's highly unlikely you had any kind of virus since there are none that affect OS X. A Trojan or a couple of others types of malware, possibly.
    Anyway, I presume "It" is Mountain Lion? If this purchase was from anywhere other than directly from Apple, either through the App Store or Apple's online store, then you bought an illegal copy from another vendor. As such, it's very likely that download of ML itself was laced with malware.
    You should fix your tag line. iOS 7 and a 13" MacBook have nothing to do with each other. The iOS is a completely separate OS and is only for Apple's mobile devices such as the iPhone and iPad. OS X is what runs Apple's computers, such as your laptop, iMac, Mac Pro and Mac Mini.
    Your tag line also doesn't match up with your post. All late 2007 MacBooks came with Leopard, 10.5.x and can't run any OS higher than Lion, 10.7.x. So it's not possible you ever had Mountain Lion, 10.8.x running on that Mac.
    If you did purchase Mountain Lion (much more likely, Lion) through the App Store, all you need to do is login to the App Store with the identical user name and password you make your App Store purchases under. You will be able to download and install your OS upgrade again at no cost.

  • Help with running my web app using JDeveloper 10g Release 3 (Version 10.1.3

    Hi All.
    I'm having an issue trying to run my web app. Here is what's happening. I have a JSP and I right click on it and choose "Run".
    All my files compile successfully and I get the following out in the Embedded OC4J Server - Log:
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    **** Unable to obtain password from principals.xml. Using default.
    C:\Program Files\JDeveloper\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\config>
    "C:\Program Files\JDeveloper\jdk\bin\javaw.exe" -ojvm "-Doracle.home=C:\Program Files\JDeveloper" -classpath "C:\Program Files\JDeveloper\j2ee\home\oc4j.jar;C:\Program Files\JDeveloper\jdev\lib\jdev-oc4j-embedded.jar" -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config "C:\Program Files\JDeveloper\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\config\server.xml"
    [waiting for the server to complete its initialization...]
    05/12/10 21:07:24 java.net.ConnectException: Connection timed out: connect
    05/12/10 21:07:24      at java.net.PlainSocketImpl.socketConnect(Native Method)
    05/12/10 21:07:24      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    05/12/10 21:07:24      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    05/12/10 21:07:24      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    05/12/10 21:07:24      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
    05/12/10 21:07:24      at java.net.Socket.connect(Socket.java:507)
    05/12/10 21:07:24      at java.net.Socket.connect(Socket.java:457)
    05/12/10 21:07:24      at java.net.Socket.<init>(Socket.java:365)
    05/12/10 21:07:24      at java.net.Socket.<init>(Socket.java:207)
    05/12/10 21:07:24      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.sendMessage(Oc4jNotifier.java:98)
    05/12/10 21:07:24      at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.postInitApplicationServer(Oc4jNotifier.java:55)
    05/12/10 21:07:24 Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview initialized
    05/12/10 21:07:24      at com.evermind.server.ApplicationServer.serverExtensionPostInit(ApplicationServer.java:1041)
    05/12/10 21:07:24      at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:927)
    05/12/10 21:07:24      at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:98)
    05/12/10 21:07:24      at java.lang.Thread.run(Thread.java:595)
    Any reason as to why this is happening? I ran this version on another computer a few days ago and all went well, but now trying it on my computer is impossible.

    I'm having the exact same problem after installing JDev 10.1.3. Did you ever get a solution to this?
    Any information would be appreciated.
    Thanks.
    [waiting for the server to complete its
    initialization...]
    05/12/10 21:07:24 java.net.ConnectException:
    Connection timed out: connect
    05/12/10 21:07:24      at
    java.net.PlainSocketImpl.socketConnect(Native
    Method)
    05/12/10 21:07:24      at
    java.net.PlainSocketImpl.doConnect(PlainSocketImpl.jav
    a:333)
    05/12/10 21:07:24      at
    java.net.PlainSocketImpl.connectToAddress(PlainSocketI
    mpl.java:195)
    05/12/10 21:07:24      at
    java.net.PlainSocketImpl.connect(PlainSocketImpl.java:
    182)
    05/12/10 21:07:24      at
    java.net.SocksSocketImpl.connect(SocksSocketImpl.java:
    364)
    05/12/10 21:07:24      at
    java.net.Socket.connect(Socket.java:507)

  • Will Lion run my old apps?

    I have a 2007 MacBook Pro, 2.2 GHz Intel Core 2 Duo, 2 GB 5667 MHz DDR2 SDRAM, running OS 10.6.8.  It has Microsoft Office X and Dreamweaver 8 on it.  My TurboTax 2014 disc requires 10.7 or higher. Will Lion run my old apps if I upgrade?  I thought I read somewhere that it wouldn't.

    It depends upon the given applications.  Any PPC applications will not run on Lion.
    https://discussions.apple.com/docs/DOC-6841
    You could run a dual OSX system with Snow Leopard on one partition and Lion on another.
    Ciao.

  • HT5022 I've downloaded AirPort Util 5.6, in order to manage my Gen 1 Airport Express. But when I go to mount, it says it can't be installed as version of OSX (latest Mountain Lion) is not supported. Feels like Im back using Windows...

    I've downloaded AirPort Util 5.6, in order to manage my Gen 1 Airport Express - because Airport Util 6.0 won't recognise it.
    But when I go to mount, it says Airport 5.6 it can't be installed as my version of OSX (latest Mountain Lion) is not supported/does not support on 5.6.
    Super unhelpful error messages bringing back memories of using Windows...
    Anyone sussed this, or have Apple just fazed out the original Airport Express hardware on the sly?

    Generation 1 AirPort Express is Model No A1264. Check the side of your Express to look for the model number there.  AirPort Utility in Mountain Lion will configure this model.
    More likely, you have an older "b/g" version of the Express. Apple started the "Generation" thing with "n" capable devices.  The Model number of your device is likely either A1084 or A1088. AirPort Utility in Mountain Lion no longer supports these older "b/g" devices.
    If you have a Mac there running an earlier version of the operating system, you can use that to configure the Express.
    Or, there is is workaround to install AirPort Utility 5,6 for Lion on Mountain Lion. See this article for details:
    http://www.macworld.com/article/1167965/mountain_lion_and_the_ancient_airport_ba se_station.html

  • I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with   - how can I change this?

    I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with %20  - how can I change this?

    Click on the below link :
    https://get.adobe.com/flashplayer/otherversions/
    Step 1: select Mac OS  X 10.6-`0.`0
    Step 2 : Safari and FIrefox
    Then click on " Download Now"  button.

  • Will Mountain Lion Run on a Solid State Drive?

    Will Mountain Lion Run on a Solid State Drive?

    carlart wrote:
    Will Mountain Lion Run on a Solid State Drive?
    Think about it for a second.  Some Macs come with SSDs, so obviously the OS runs on them...

  • When is mountain lion coming to the app store.

    When is mountain lion coming to the app store?I've searched the app store and apparently it doesn't exist.
    The add says coming in july.It's July.

    Or today, for some of us....

Maybe you are looking for