Apache: 403 Forbidden error when trying to change DocumentRoot

I am developing several websites, but I prefer to store them in a directory at the root of my hard drive (let's call it /Websites) rather than in ~/sites or /Library/WebServer/Documents. I want to be able to preview php files locally for testing purposes, but am having trouble figuring out how to give Apache access to them without temporarily moving them into ~/Sites and back every time. The Apache documentation suggests two ways which I may point to /Websites: 1) by changing DocumentRoot in httpd.conf, or 2) through symbolic links.
The problem is, either method results in a 403 forbidden error. I assured that permissions were set the same way as the files Apache can access (755 for directories, 664 for files) and tried changing ownership to root, admin... but it didn't work and I'd prefer not to have all of my site files owned by root as it makes editing difficult.
What am I doing wrong? Any suggestions?
I also tried adding the following to httpd.conf but it had no discernible effect.
<Directory "/Websites">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
Assuming it did work, would changing the "Allow from..." line to "Allow from 127.0.0.1" or "Allow from localhost" along with "deny from all" be the proper way to let me preview on the local machine without serving my test pages to the entire internet?

Did you change this to reflect new DocRoot?
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
# This should be changed to whatever you set DocumentRoot to.
<Directory "/Library/WebServer/Documents">

Similar Messages

  • What does "ajax submit failed: error = 403, forbidden" mean when trying to sign up for eprint?

    what does "ajax submit failed: error = 403, forbidden" mean when trying to sign up for eprint?

    Hi,
    Please use different browser such as Firefox or Chrome and try again.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • 403 Forbidden Error while trying to access External SharePoint site in SP 2010

    I am trying to access external Claims based SP site and trying to download the file from a doc library.
    I am receiving the 403 Forbidden error when executing the code.
    I am using SP 2010 and Client Object Model.
    PFB the code I am running.
    using (SPCOM.ClientContext clientContext = ClaimClientContext.GetAuthenticatedContext(siteURL))
    if (clientContext != null)
    clientContext.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
    clientContext.Load(clientContext.Web);
    clientContext.ExecuteQuery();
    SPCOM.Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    using (SPCOM.FileInformation fInfo = SPCOM.File.OpenBinaryDirect(clientContext, item["FileRef"].ToString()))
    string fileName = (string)item["FileRef"];
    fileName = string.Concat(SaveLocation, fileName.Substring(fileName.LastIndexOf("/") + 1));
    //now save it
    using (System.IO.FileStream outPutFile = System.IO.File.OpenWrite(fileName))
    fInfo.Stream.CopyTo(outPutFile);
    fInfo.Stream.Close();
    I suspect the OpenBinaryDirect method ,
    I am also using Cookie based authentication I guess PFB the code for that.
    public static ClientContext GetAuthenticatedContext(string targetSiteUrl)
    return (GetAuthenticatedContext(targetSiteUrl, 0, 0));
    /// <summary>
    /// This method will return a ClientContext object with the authentication cookie set.
    /// The ClientContext should be disposed of as any other IDisposable
    /// </summary>
    /// <param name="targetSiteUrl"></param>
    /// <returns></returns>
    public static ClientContext GetAuthenticatedContext(string targetSiteUrl, int popUpWidth, int popUpHeight)
    CookieCollection cookies = null;
    cookies = ClaimClientContext.GetAuthenticatedCookies(targetSiteUrl, popUpWidth, popUpHeight);
    if (cookies == null) return null;
    ClientContext context = new ClientContext(targetSiteUrl);
    try
    context.ExecutingWebRequest += delegate(object sender, WebRequestEventArgs e)
    e.WebRequestExecutor.WebRequest.CookieContainer = new CookieContainer();
    foreach (Cookie cookie in cookies)
    e.WebRequestExecutor.WebRequest.CookieContainer.Add(cookie);
    catch
    if (context != null) context.Dispose();
    throw;
    return context;
    If anyone has an idea of why is this happening, pls help me. 
    Thanks,
    K.V.N.PAVAN

    Hi,
    Please try to add following line of code before you initialize cookie container.
    e.WebRequestExecutor.WebRequest.UserAgent = “Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)”;
    http://razirais.wordpress.com/2011/05/19/how-to-fix-sharepoint-online-403-forbidden-error-while-downloading-files-using-client-object-model/
    Or change the following line of code
    clientContext.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
    to
    clientContext.Credentials=new NetworkCredential("Username", "Passworkd", "Domain");
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • 'Blank user name' error when trying to change email password

    My password on our mail server changed, when I tried to change the password on my Storm 9500 I get 'Blank user name' error when trying to change, but I have typed in a user name!!!!
    BLOODY frustrating because now I am not receiving any mails at all, so my business out of the office has come to a standstill!!!!
    Vicky
    Solved!
    Go to Solution.

    Try changing the email password on your PC, if you are having problems doing so from your device.
    From your desktop PC:  http://www.blackberry.com/btsc/KB02830
    North American Carriers - scroll down to select your carrier
    WorldWide Carriers - Find your carrier on the list
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Keep receiving error when trying to change device on my verizon.  Unfortunately, none of the lines on your account are eligible to receive the Online Authorization Code

    Keep receiving error when trying to change device on my verizon.  Unfortunately, none of the lines on your account are eligible to receive the Online Authorization Code. 
    Unable to change device on account.

    That would be great if they weren't 2 different size SIM cards.
    The code is a security feature and I realize this. It is to prevent someone from hacking your account and changing your devices without your knowledge. However, I am the account owner and I know exactly what is going on with my account at all times. I check data usage AT LEAST 2 times daily and I log into my account at least once daily. I would very quickly discover any issues. This feature is more of a (removed)
    Edited as required by the Verizon Wireless Terms of Service
    Message was edited by: Admin Moderator

  • Getting a "403 Forbidden" error when I login ..

    Hi all ... Well yesterday I did a new installation of Oracle Express Edition 11g DB, which installed fine ... I then installed OC4J, and then finally installed APEX Listener 4.1 ...
    Now, when I opened 127.0.0.1:8888/apex/listenerAdmin for the very first time .. I saw a page where I was to configure the connection .. At that point I was unable to get the 'Basic' connection working (I think the error was that the Listener was unable at connect to the database), and so I closed down that page ..
    Now, one day later, when I open 127.0.0.1:8888/apex/listenerAdmin, I am asked for some login details ... I don't know what to put here to login .. In fact I have not successfully logged in here even once ..
    However, some clues are as follows: Before installing APEX Listener, I defined some new roles and users from the OC4J web interface ... If I try logging in through any of these, I get the '403 Forbidden' error ... Otherwise, if I enter any other random login details, the same login box keeps popping up ..
    So anyone know whats the problem here ? ... I suspect that no connect between APEX Listener and the Oracle DB is yet defined, which is why these problems are occuring ...
    I tried 'undeploying' APEX listener from the OC4J web interface, and then again 'deploying' it, but the exact same thing is happening ..
    Can anyone help me out here ?
    EDIT:
    I assume maybe I'm supposed to use the APEX_PUBLIC_USER account, which I configured in oracle before installing APEX (as per intructions in Oracle installation guides), but even when I try logging in through APEX_PUBLIC_USER, my login details are not accepted ... Also, I AM able to login into Oracle Database using APEX_PUBLIC_USER, but not in APEX Listener ... And since unlike what I described above, when I enter my APEX_PUBLIC_USER login details, the same login prompt keeps reappearing, meaning the login is not recognised at all ...
    Edited by: user7366837 on Sep 9, 2011 3:39 AM

    Hi,
    Now, when I opened 127.0.0.1:8888/apex/listenerAdmin for the very first time .. I saw a page where I was to configure the connection .. At that point I was unable to get the 'Basic' connection working (I think the error was that the >Listener was unable at connect to the database), and so I closed down that page ..I think the page you actually opened was http://127.0.0.1:8888/apex/listenerConfigure . At least, this is the page for the initial configuration. You can call it again until you've configured the database successful for the first time.
    Now, one day later, when I open 127.0.0.1:8888/apex/listenerAdmin, I am asked for some login details ... I don't know what to put here to login .. In fact I have not successfully logged in here even once ..The admin page needs the credentials you've configured on your OC4J.
    However, some clues are as follows: Before installing APEX Listener, I defined some new roles and users from the OC4J web interface ... If I try logging in through any of these, I get the '403 Forbidden' error ...... which you seem to have done, but probably you've some typo in there. Please note that you have to use the exact role names as described in the installation manual. A common problem is that users don't care about case sensitivity... This would fit to the symptom: You have a correct username/password combination, so the basic authentication is done, but the user is not authorized to call listenerAdmin because he doesn't have the appropriate role.
    -Udo

  • HTTP Error 403 - Forbidden  error when auto including a jspx page

    Hi All -
    We have a situation where one of different reports pages gets included inside a main reports page based on user selection via a selectOneChoice control.
    But when the Reports Main page tab is clicked for the first time we get a "You are not authorized to view this page" HTTP Error 403 - Forbidden error.
    Upon clicking "Refresh" and then clicking the Reports Main page tab again, the page renders correctly.
    This is our code snippet. All the report related pages(MainPage.jspx, Schedule.jspx and Budget.jspx) are inside a reports folder under the context root. Please help.
    Thanks for your time.
    MainPage.jspx
    =====================
    Here I have a selection box, and based on the user selection I include different JSPX pages. The page Definition of this page
    contains all the executables and the bindings of the included pages also.
    <af:selectOneChoice value="#{backing_Reports.measureSelected}"
    label="Measure" unselectedLabel="Select One"
    id="selectmeasure" autoSubmit="true"
    immediate="true">
    <af:selectItem label="Schedule Data"
    value="Schedule.jspx"/>
    <af:selectItem label="Budget Data"
    value="Budget.jspx"/>
    </af:selectOneChoice>
    <af:panelGroup>
    <jsp:include page="${backing_Reports.measureSelected}" flush="true"/>
    </af:panelGroup>
    Faces Config:
    ===================
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>GlobalHome</from-outcome>
    <to-view-id>/pages/Welcome.jspx</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case>
    <from-outcome>GlobalReports</from-outcome>
    <to-view-id>/reports/MainPage.jspx</to-view-id>
    </navigation-case>
    <!-- 1. Reports menu tab item -->
    <managed-bean>
    <managed-bean-name>menuItem_Reports</managed-bean-name>
    <managed-bean-class>cs.view.menu.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>label</property-name>
    <value>#{resources['scorecard.menu.reports']}</value>
    </managed-property>
    <managed-property>
    <property-name>viewId</property-name>
    <value>/reports/MainPage.jspx</value>
    </managed-property>
    <managed-property>
    <property-name>outcome</property-name>
    <value>GlobalReports</value>
    </managed-property>
    </managed-bean>
    :

    We have solved this, temproarily. But don't know if this is the best method to do this. Please post if somepne has a better way of doing this.
    While debugging we found that the ${backing_Reports.measureSelected} field which was set to a default value in backing bean was returned as null when the page renders for the first time. So we had a work around like this in our MainPage.jspx
    <af:panelBox width="80%" partialTriggers="selectmeasure"
    inlineStyle="margin:40.0px;">
    <af:panelGroup>
    <jsp:include page="${backing_Reports.measureSelected==null?'BlankPage.jspx':backing_Reports.measureSelected}"
    flush="true"/>
    </af:panelGroup>
    </af:panelBox>
    Thanks.

  • 403 Forbidden Error while trying to access External SharePoint site Via Client Object Model

    Hi,
    I am accessing the External SharePoint site from an intranet. When I try to access local sharepoint site in my intranet via Client object model to upload few documents into a library, it works perfectly fine without any issues.
    But when I try to do the same (upload few docs ) to an external SharePoint 2010 site out of my intranet from my intranet, I get 403, forbidden error. It looks like there is some issue with login credentials of this site. But when I try to navigate to the
    site URL in Visual studio  2010, it asks for credentials and takes me to home page.
    I supplied the credentials in different forms like
    ctx.Credentials = new NetworkCredential("username", "password", "domain");
    and
    clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
    and
    FormsAuthenticationLoginInfo formsAuthInfo = new FormsAuthenticationLoginInfo("MyUser", "MyPassword");
    clientContext.FormsAuthenticationLoginInfo = formsAuthInfo;
    but nothing seems working and I get the Same 403 error. What am I missing here?
    Thanks,
    K.V.N.PAVAN

    Hi Pal,
    Thanks for posting your query, Just try to add credentials to your clientContext object as mentioned below
    NetworkCredential credentials =
         new NetworkCredential("username", "pwd", "domain");
    clientContext .Credentials = credentials;
    or use
    clientContext.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
    I hope this will be helpful to you, If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog :http://sharepoint-community.net/profile/DharmendraSingh

  • Error when trying to change scheduling agreement

    Hi gurus,
    I have created a scheduling agreement via me31l and all is ok.
    I'm finding an issue when trying to change the agreement via me32l.
    If i add a new item and save, all seems ok, but the new item is note created and the below error is raises (sm13):
    Function Module: RV_KONDITION_SICHERN_V13A
    Status: Update was terminated
    Report: LV13AU02
    Row: 209
    Error details: Class: VK - Number: 211
    VK 211: UPDATE error Table KONM. Return code 4
    The curious thing is that if we add an item with the same material, the error is not raised and the scheduling agreement is properly updated.
    Could you suggest me how to solve this issue?
    Thanks in advance,
    Valentino

    Hi RAVI,
    the issue was solved with the maintenance of material inforecord. There was only one price condition mainteined with the flag "scales"... We have removed the flag from the interested material, then it has been possible to change and create scheduling agreements.
    Thanks & Regards,
    Valentino

  • IChat Internal Error when trying to change own Buddy Icon

    On my son's iBook G4 with OS 10.4.5 and iChat AV 3.1.1, he gets an error when trying to insert some JPG photos for his own Buddy Icon. It says:
    iChat Internal error! NSInvalidargumentexception: * -[NSCFArray addObject:] attempt to insert nil
    Also where are all your recent pictures stored??? Upon searching iChat Recent Pictures on my HD, it see they should be User>Library>Images>iChat Recent Pictures. However upon tyring to open that fiel, I get a message saying, "The alias 'ichat Recent Pictures' could not be opened, because the original item cannot be found." I can select delete alias, fix alias or ok. Might this also relate to my problem?

    Hi Michael,
    I pointed you to that thread as the error message you posted is normally associated with either a spellcheck problem or something odd with the Me Card in the Address Book.
    You can drag pics to the Recent Buddies folder but iChat will not see them.
    Create a New Folder and call it iChat Recent Pictures
    The alias should be removed.
    You should now find that iChat will let you select a choice as a new Buddy Pic.
    This is done by clicking on the current Buddy pica nad selecting the "Edit Picture" option.
    Then "Choose".
    Navigate to the Pic and then resize as require.
    Use the "Set" button.
    This will convert the pic to a jpeg 2000 copy of the original and the Recents.plist which is needed within the folder.
    You should now be good to go.
    2:03 PM Friday; February 24, 2006

  • HTTP 403 Forbidden access when trying to download latest version of dirsync

    Hello
    when trying to download the latest version of DirSync, always get
    HTTP 403 Forbidden access
    From
    http://social.technet.microsoft.com/wiki/contents/articles/18429.microsoft-azure-active-directory-sync-tool-version-release-history.aspxI clicked on The latest version can be downloaded here: link at the top of the page
    A new window opened and got the error message
    Shortlink (from the The latest version can be downloaded here: link):
    http://go.microsoft.com/fwlink/?LinkID=278924
    URL shown in the address bar:
    https://bposast.vo.msecnd.net/dirsync/6198.0037/amd64/dirsync.exe
    Senior Solution Architect at Sogeti MVP SharePoint http://blog.hametbenoit.info

    Seems to
    work for me.  Perhaps there is an intermittent issue in your region, or maybe you have a local network condition blocking the download.
    Mike Crowley | MVP
    My Blog --
    Planet Technologies

  • Error when trying to change the Query in Bex??

    Hi Gurus,
    I have a query based on infocube. When I am trying to change the query, its giving me the error "This component was edited with a more recent version of Editor. You also have to use the more recent version to edit further. Further processing not possible. Update your front end".
    Please help with this.

    Hi, I am actually stuck here. Can you please let me know which among these is the higher version.
    1) Final Release 3.50
       Version 3500.3.016
    2) Final Release 3.50
        Version (Revision 481)
    Because it is working fine in the 1st one whereas its throwing that error pop-up in 2nd one(as soon as we select the Change query global definition option) .

  • Error when trying to change CC list of email item in SP 2010 workflow

    When I tried to change the CC list of an email in a workflow that involved removing a few email ids and adding another id to the list, on publishing it I get the following error : 
    (0, 0) Activity 'ID3737' validation failed: Path resolved to Referenced activity Property 'ReturnValue' whose PropertyType 'Microsoft.SharePoint.Workflow.SPItemKey' does not match with the Target Type 'System.Int32'.)
    (0, 0) Activity 'ID3732' validation failed: Path resolved to Referenced activity Property 'ReturnValue' whose PropertyType 'Microsoft.SharePoint.Workflow.SPItemKey' does not match with the Target Type 'System.Int32'.)
    The workflow was originally created in SharePoint 2007 and later migrated to SharePoint 2010. Also the newly added id is listed by the account name instead of the email address similar to the existing email-ids.
    Can someone please shed some light on what the error means and why I am encountering this particular error?

    Hi,
    Pls check this link
    https://support.office.com/en-us/article/Troubleshoot-workflow-errors-8fcf47e5-a410-4714-880b-2611b18a56ce#bm6
    <section class="ocpSection" style="color:#363636;font-family:'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif;font-size:10px;line-height:normal;">
    Cause
    One or more actions used in the workflow reference assemblies are not listed in the safe list in the web.config file.
    One or more actions used in the workflow reference assemblies are listed as unsafe in the safe list in the web.config file.
    </section><section class="ocpSection" style="color:#363636;font-family:'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif;font-size:10px;line-height:normal;">
    </section>
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Creating an Intranet and using IIS 6 and recieiving a 403.14 error when trying to access remote servers share.

    I can access the remote shares contents in my browser if I use file:////<server name>/share/filename.file but when I set up a link in the html code, I receive the 403.14 error in the log files.  I also have directory listing set on the IIS 6 webpage
    on our intranet server.
    I am stuck and at a loss... I'm not terribly familiar with IIS...
    Thanks in advance,
    Eric

    Hi,
    Base on my experience, the UNC must use the
    \\+PATH format, in some case if your code is not standard it will cause unknow error, more about the IIS question please post to the IIS forum.
    More information:
    IIS support forum
    http://forums.iis.net/
    Naming Files, Paths, and Namespaces
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
    Thanks for your understanding and support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Error when trying to change Customer Exit Enhancement RSR00001

    Hi Gurus,
    I am getting the following error when I am trying to change the Customer Exit Enhancement RSR00001: "Source Text of Exit Func. not changeable."
    Please help.
    Thanks,
    Ashmith Roy

    Hi ,
    Not sure why u would like to change the text but can u try this way:
    1) go to smod and key in the enhancement
    2) click on change button and reneter the new text after accepting the language option as logon language
    3)save under a transport
    4)go to cmod and recheck the text must be changed.
    kindly award points for the same.
    tx,
    Madhu

Maybe you are looking for

  • Ipod touch 2nd generation won't connect to computer

    Just bought a used Ipod touch and I am unable to get it to be recongized by itunes or my computer (MacBook pro using Lion). Computer - Itunes all updated.  I tried to restore unit (sleep and hold buttons) but I can't get past he "connect to Itunes" s

  • Windows 7 - HP Laserjet 8500 print driver problem

    I have tried everything imaginable to correct this HP 8500n print driver problem with no success, please help! I cannot correct or get rid of a reoccurring “Incompatible Print Settings” error dialog box message that repeatedly states that “There are

  • Update to Firefox 3.6.17 hangs after Checking Compatibility of Java Console - I have sceenshot

    Update to Firefox 3.6.17 hangs after Checking Compatibility of Java Console - I have a sceenshot

  • Problem with OSCP revocation checking

    Hi, since patch 10.1.3 we have a problem with Adobe Reader on englisch OS (xp sp3 and win7, all MS Updates installed). We use a software deployment system to install Adobe Reader and preset some preferences for signing pdf documents (preferences/secu

  • Bridge for entire network

    Here is my problem. I am taking a back up drive full of client images. There are many folders/subfolders within this drive. Ultimately, I want each computer within the network to be able to do keyword searches for images. There are so many, I want th