How do I set up a root directory for a web site

So this is probably a naive newbie question.
I have been creating websites driven by php/mysql on my mac for years using the previous the web preference pane to run Apache and since that went away using XAMPP to provide Apache/php/mysql functionality on localhost.
I decided to download OSX server and try to use that.  Figured might as well go native MAC.
I am baffled.
The manual says to set up a web site in Server by working through the Websites Services interface. I did that and pointed the setup at the directory where I have all of my web site files.  I now have no idea how to access that page from my local machine.
I have tried:
http://localhost/myURL
http://localhost/~username/Sites/[root file directory]  -- where the files are stored
I also tried some typical localhost ip address
None access my site.
How do I access my site over my local netework?
I feel like just dumping server.app and stting things up through the terminal.
Thanks,
--Kenoli

How familiar are you with the bash command line and with Apache, and how much do you want to learn about Apache and related topics?  (If you're not already, then I'd encourage learning about this material, as this knowledge is very useful for maintaining and updating sites, and knowledge of correctly securing files and directories is critical to building and maintaining secure web sites — all of managing and running and updating a web server builds on these foundations.  There are various good books and web sites on Apache, and the Apache web site has various materials available, if you don't already have something.)
The localhost host name and the 127.0.0.1 IPv4 address are both synonyms for the "me" host.  It's the name and the address that always gets you to the current host.
With http://localhost/ or http://127.0.0.1 specification, what you enter at the URL address bar is relative to the root directory specified for the default web server, and will default to the index.html or index.php page or whatever the default web site is configured to use.  With OS X Server, this root directory is configured via Server.app.  To use Server.app, launch it, connect to the server, select Websites from the left navigation, and you (by default) will see a default site and a secure site.  Select the default site.  Select the edit button below the site to edit (and to view) the configuration. 
With the details of the default site visible, you will see the path to the default web directory.  This path to the default web directory is where the files for the default web sever location reside. 
The default path to the default web site is /Library/Server/Web/Data/Sites/Default
If you place foo.html in that directory (or whatever the defailt web site is using), you can view it via your web browser and the URLs:
http://127.0.0.1/foo.html
http://localhost/foo.html
To get to the default web site using the GUI, launch Finder and select Go To Folder, and enter that string into the box.  You will now get a GUI view of that folder.  (I'd strongly recommend using the command line here, and not the GUI.  To get to the directory from the command line and then list the files present, launch Terminal.app from Applications > Utilities folder and issue the following commands:
cd /Library/Server/Web/Data/Sites/Default
ls
If you want to test something in the browser, you can use the file:///path-to-file-to-test mechanism.  Most web browsers will allow you to render local files directly using file and three slashes.
You will need to ensure the executable files (scripts) are marked as executable to OS X, using a Terminal.app command such as the following:
chmod o+x path-to-file
Enabling ~/user per-user sites involves directly editing the configuration file, as Apple has disabled that by default. 
There's an Apache tutorial with an overview of what's involved with enabling per-user directories here, and there's what's been listed in my earlier replies and links.  With OS X Server Mavericks, the default configuration file for Apache is located in the Library folder, and can be viewed with the following Terminal.app command:
cat /library/server/web/config/apache2/httpd_server_app.conf
This file is the OS X Server equivalent of the oft-cited httpd.conf file you'll see listed in various documentation.
If you want to enable the per-user directories or tweak other Apache settings, then shut down Apache from Server.app or from the command line, and then edit the configuration file with nano or some other command-line editor using a command similar to this:
sudo nano /library/server/web/config/apache2/httpd_server_app.conf
you'll end up finding and uncommenting (removing the #) from the following two lines:
#LoadModule apple_userdir_module ${SERVER_INSTALL_PATH_PREFIX}/usr/libexec/apache2/mod_userdir_apple.so
#Include /private/etc/apache2/extra/httpd-userdir.conf
If you have specific questions about this, then I and others here can answer those.  If you don't understand something, then asking a question about that can help you learn, and can help me understand what it is that I'm posting in my replies here that's confusing you.  There are also various resources available for learning Apache, and I'd encourage spending a little time with those if you've not already done so or feeling at all unsure about how that tool works; I end up re-re-reviewing the Apache docs fairly regularly.

Similar Messages

  • Setting up class root directory for application server

    Hi all,
    When i try to deploy my Ejnterprise java bean in sun one application server i get ar error dialog box " plz consult online assistance for setting class root directory" while loading the class files.I tried online but in vain.Can any one tell me how to set up the class root directory in sun one app server platform edition 8.
    But i had many other beans b4.suddenly m encoutering this problem from past 2 3 days.Kindly help me.
    Waiting for ur replies!
    Thanks,
    Akshatha

    Hi Eric and Jennifer
    A couple of answers to your questions:
    1. LC Forms is just an API - you have to build your own web application (or some other type of application) if you want your users to be able to interact with PDF forms.
    2. You can use Eclipse to build web applications. It's just one of many tools for doing so, but it's a fantastic development environment, and it's free.
    3. Lomboz no longer exists. It has been integrated directly into Eclipse as one of the sub-projects, "WebTools". The easiest way to install web tools is via the Callisto "packaging". This makes sure that you get all the right versions of everything you need. See:
    http://www.eclipse.org/callisto/
    4. The tutorial mentioned still provides some useful information, although names have been changed.
    5. There are lots of books about developing Web Apps in Java, using servlets or JSP.
    6. FormsIVS is just a small sample application that allows you to test rendering or prepopulating a form. It's not intended as an end-user product.
    7. If you're interesting in some assistance, we do provide training, mentoring, and turnky application development. Send an email to info "at" avoka.com if you want more info.
    Good luck...
    Howard
    http://www.avoka.com

  • How can I set up an App Tabs for an active site like one of the BBC's radio stations? They turn out to be static and soon out of date.

    I have been using an App Tab for static pages within Ancestry. No problem.
    But I would like to make an App Tab for one of the radio stations for the BBC network in the UK. (I live in the UK.)
    Every time I do so the tab sticks at the time I installed it. No good for listening to current programs 2-3 days later.
    Has the introduction of active tabs just arrived with Firefox 5 (which I only installed five minutes ago)?

    I agree anti-relay can be using UBE feature. However, there is serious problem in reject the spam mail. My nms is using UBE feature to stop spam mail. According to the work flow of the UBE, the mail is received by nms completely and UBE is going to invesgate the mail address. Although UBE can stop the spam mail, the spam mail have a trouble in returning the mail to the sender. The reason is the sender address is usually not existed in the world. That will cause a lot of mail waiting in the mail queue.
    In my experience, do not use UBE for anti-relay.

  • How to set a root directory for file management in web application

    Is it possible to set a default root directory for file management for a web application ?
    We would upload some files and store them in the web server.
    When we write the uploaded files without any path, the files are written in the config directory into the jdeveloper embedded oc4j directory.
    When we write the uploaded with a relative path ("/somedir/filename"), the files are written in C:/somedir/filename.
    We would like that all file management with relative path into the web application refer automatically to a given root directory (for example defined in web.xml).
    Is it possible ?

    I'm using the standard upload in adf faces.
    The problem is not during upload. This is managed in a temporay directory defined in web.xml. The problem is for writing the file that was uploaded (upload give us an inputStream we have to write somewhere, eventually after unzipping).
    Here is an example of our current code.
    if (mimeType.equals("application/x-zip-compressed") |
    mimeType.equals("application/zip")) {
    File destZipFile =
    new File(rootDirectory + "/" + parametersDirectory +
    "/" + uploadedFile.getFilename());
    BufferedInputStream isZipFile =
    new BufferedInputStream(uploadedFile.getInputStream());
    FileOutputStream fosZipFile =
    new FileOutputStream(destZipFile);
    BufferedOutputStream bosZipFile =
    new BufferedOutputStream(fosZipFile, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = isZipFile.read(data, 0, BUFFER)) !=
    -1) {
    bosZipFile.write(data, 0, currentByte);
    }

  • I want to find the root directory for a png file on my Macbook air

    I am using html to make a website and want to use a png on my macbook but need the root directory for the image source. I am not sure how to get this, can anyone tell me how?

    If you are hosting a web server from your Mac, you should place the images inside /Library/WebServer/Documents or inside your user Sites folder. The www user will not be able to access a file from anywhere else unless you give it permission to do so.

  • How do I set-up on %ORACLE_HOME%\bin for Oracle client on Windows XP

    How do I set-up on %ORACLE_HOME%\bin for Oracle client on Windows XP?
    The Oracle bin directory is: C:\oracle\ora90\bin
    Thank you!

    If you are asking how to setup the resolution of %ORACLE_HOME%\bin to C:\oracle\ora90\bin, you must create a system environment variable called ORACLE_HOME that is set to a value of C:\oracle\ora90.
    Kind regards,
    Russ

  • How do I set up a seperate account for my wife?

    We finally purchased a nice new iPhone for my wife. But she would like her own iTunes account. How do I set up a seperate account for her? She has her own laptop, with an iTunes account on it that I was using. Should I just un-install that iTunes package and have her download a new version? I'd rather have two versions so I don't lose the music on that old iTunes account. It's not huge, but would be a PITA.

    Apple ID
    Go to iTunes > Store > Sign Out (your apple id) and sign your wife apple id in.

  • How do I set Firefox to be usable for all users on one computer?

    How do I set Firefox to be usable for all users on one computer?

    I would think the about:config entries discussed are ex-factory set to values each user has to change individually, after the installation has run its course. The solution could be to have patched files ready to install post factum:
    [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences A Brief Guide to Mozilla Preferences - MDN]

  • How do i set up a second display for my iMac desktop?  I want to use both displays at the same time.

    how do i set up a second display for my iMac desktop?  I want to use both displays at the same time.  My iMac is the 24" Late 2006 model.  I recall that there is a cord for plugging in a second monitor, but I want to make sure that i can use both monitors side-by-side at the same time.  thank you.

    If the Display supports DVI, then you will need a > Mini-DVI to DVI Adapter and a DVI cable.
    If the Display only supports VGA, then you wiil need a > Mini DVI to VGA Adapter and a VGA cable.
    Noting that the (digital) DVI is far better than the (analog) VGA connection.
    Also see > Using Dual Displays on Mac OS X: The Experience

  • How can i set up multiple user accounts for my new ipad mini?

    How can i set up multiple user accounts for my new ipad mini?

    The iPad mini is basically a one user device. There are no Accounts. You can set up restrictions so that only you can do certain things.

  • How do I set the default welcome page for PUBLIC user

    gurus,
    i'm using -
    Oracle 9i Database
    Oracle 9ias Portal Release 2
    QUESTION => how do I set the default welcome page for the PUBLIC user.
    i did the following to achieve this -
    1. logged into portal
    2. clicked on builder
    3. clicked on administer tab
    4. selected PUBLIC user in the Portal User Profile portlet
    5. went to the preferences tab
    6. in the default home page selected a custom page group
    7. logged out of portal
    8. open a new browsere session
    9. type the portal URL and i get the login page ....??
    i'm unable to understand this behavior ... shouldn't i be getting the page group that i set for the PUBLIC user in step 6 above ....
    the second QUESTION is => when the user logs out he/she should see the PUBLIC page set in step 6 above ... but, instead the user sees a page that is as follows -
    Partner Application Name Logout Status [Logout Status]
    Oracle Portal (portal) logout status
    The SSO Server (orasso) checkmark
    buzz.resva.trw.com:7778 checkmark
    infrastructure.happy.resva.trw.com checkmark
    portal1.buzz.resva.trw.com checkmark
    portal2.sylvester.resva.trw.com checkmark
    sylvester.resva.trw.com:7778 checkmark
    so, how can i set the default page for the PUBLIC user and also a page when he user logs out.
    ideas anyone ....?
    thanx a bunch.
    hero

    Hi,
    The sequence of operation you are doing to set the home page for public users is correct. You are getting the login screen as the "custom page group" selected as "home page" has not been granted to public.
    Also, while logging-out, it is normal behaviour to get the screen where it shows the list of partner applications from where user has been logged-out. When you click on "Return" button, you will get to the "home page" set above.
    Hope it clarifies the things.
    Regards,
    Ved

  • HT2731 How do I set up an Apple ID for a child with gift card credit

    How do I set up an Apple ID for a chld with a gift card credit, without credit card details and without using my own account?

    Go to the main iTunes Store page (within iTunes),  click on the "Redeem" link on the right side of the page, click "Create Apple ID", and enter in the code from your card when requested. You should be able to create an iTunes Store account for your child without needing a credit card. You'll just need an email address for him/her to create the ID, though it can be a "temporary" one that you don't intend to really be used. You can change the email address to which receipts are sent to an account you really wish to use.
    Regards.
    Message was edited by: varjak paw

  • How can i set a global error page for all error cod

    how can i set a global error page for all error code?
    i don't want to leave a long list in the web.xml file.could any one help me?
    thanks

    If u have a common Error JSP named as ErrorPage.jsp
    You need to have the following piece of code in the JSP as :
    <%@ page isErrorPage ="true"%>
    This makes it as the Common Error Page for the Application. Now all you need to do is from other JSP's throw the Exception to teh container. The container will redirect to this Page and process accordingly.
    Thanks and regards,
    Pazhanikanthan. P

  • Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Just a suggestion..........
    Download Thunderbird.  Easier to use when it comes to what you want to do w/your emails. 

  • How do I set the default print margins for ALL printers in mozilla.cfg

    How do I set the default print margins for ALL printers in mozilla.cfg, even ones that are not yet installed / connected to the computer?
    I'm trying to install firefox with MDT and apply certain print options, but the printers themselves are connected at a later stage so the print.printer_myprinterhere cannot be used.

    Best answer I could find: [https://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/#comment-132668]
    If you can figure out how to add the printer name, this can be used to lock the margins.

Maybe you are looking for

  • Create Shopping Page gives Javascript Error - Sun JVM in a DMZ?

    Hi SDN We are running on SRM 5.0, with server at 5.5 and we have just implemented SP 11.  Since then, our users running IE with the Sun JVM 1.4.2_10 are getting a JavaScript  error everytime an applet loads on their page (in this case, it is the appl

  • Webi report - save as .csv is bringing double the number of rows.

    Hello all, I am running a webi report and then saving it as .csv file to my desktop but when I save the file it is giving me double the number of rows. In my report I have employee, employee key, attributes and Org unit and some measures. The .csv fi

  • See PDF attachments without saving the file

    Until a couple of weeks ago, I click on the attachment and the Adobe program will open the file and after that I decided if want to save the file. Now, when I click on the attachment, I get the "Save file" screen. then I have to open Adobe and go to

  • Get-netadapter with vlan overview

    Hello, with hyper-v i frequently use get-netadapter. Is there a pipleline command with a overview of the vlan-id of these netadapters? (like get-netadapter -vlanid) ? Thx

  • Delay with USB drive

    I have a Lacie USB drive connected to my MacBook. Frequently, when I do certain things (not sure what) but definitely when I click to save a file the drive seems to "wake up" even when Finder is just being displayed. The wake up takes about five seco