I have a general query about configuring multiple sites in Sitecore.
To simplify i would split the question in 2 parts:
I have multiple sites created under a single instance of sitecore on my Win XP machine for e.g http://www.site1.com/, http://www.site2.com etc
I then configured my web.config to reflect the multiple sites like so...
<sites>
<site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/home" database="web" .../>
<site name="website1" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" hostName="www.site1.com" startItem="/home1" database="web" .../>
...
</sites>
Then i made the corresponding host entry in the hosts file.
This works fine and i am able to access multiple sites on a browser.
Problem:
The same steps repeated on a Win 2008 R2 system does not work. Do i need to do any additional configuration?
I have downloaded and installed a Multiple Sites Manager package on my existing sitecore installation.
After doing that, my existing sites are not loading anymore.
What is going wrong here.
I have checked for any web.config entries, or any additional configuration files created in the c:\inetpub\wwwroot\<site>\website folder but could not find anything.
Any solutions/pointers in this regard would help.
One possible cause could be that you do not have the correct bindings set up in IIS 7 for the hostnames mapped in your web.config (unless you have a wildcard binding already)?
It may be the order of your tags. Generally these should go from most explicit to most default. The second one specifies a hostname, so this should go above the one without the hostname.
Daniel
It might be that you access the server efrom a remote client PC - you would need to update the hosts file on the remote client PC, or create an actual host entry in the DNS records.
Is the browser running on the server, or on a remote client?
Regards,
-John
Related
We are using the same website to host CF and Confluence (confluence runs jsp) with a URL rewrite rule to redirect to a different port 8090 which works fine as long as the url does not have .jsp in it...
but if the url does have .jsp in it CF takes over and tries to process the page so we want to disable CF from taking over.
I read that you can disable JSP at least on CF 9 - https://www.3gpp2.org/cfdocs/htmldocs/Installing/WSf01dbd23413dda0e5753779b11fae614009-8000.html
by commenting out
<!-- <servlet-mapping> <servlet-name>JspLicenseServlet</servlet-name><url-pattern>*.jsp</url-pattern> </servlet-mapping> -->
in cf_root\WEB-INF\web.xml. But I can't find JspLicenseServlet in cf_root\WEB-INF\web.xml on CF 2021.
FWIW, I would recommend running Confluence on its own IIS site using a subdomain in order to avoid the conflict you're encountering. You should not have the CF connector assigned to every IIS site, just the one that is specifically running the CF application.
According to the CF documentation,
Disabling JSP functionality (server configuration only)
ColdFusion Enterprise Edition provides support for JavaServer Pages (JSP) technology through the underlying J2EE application server on which it runs. Because JSP code runs outside the realm of the ColdFusion security framework and, therefore, is not subject to ColdFusion sandbox security, you do not typically deploy JSPs in a shared, hosted environment where more than one customer shares a single server.
DISABLE JSP FUNCTIONALITY
Open cf_root/cfusion/runtime/conf/web.xml in a text editor.
Find the servlet-mapping entry for JspLicenseServlet.
Comment out this entry, as the following example shows:
# I feel this is missing some code
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
-->
Save and close the file.
Restart ColdFusion.
Jetty is running 3 sites from webapps. On of which is a "static" angular site, another is a huge java app.
Typically, I use Ctrl + c to stop Jetty, make changes on my angular site, and start Jetty with
java -jar start.jar -DCommon.properties.path=C:\Jetty
If I try to edit the files while Jetty is running, random, buggy code is injected, breaking the site.
So this process is extremely tedious. The java app takes 15-20 seconds to load. So if I forget a slash, it takes about a min to shut it down and restart it.
Is there a way I can just stop/start only one of the webapps instead of all 3 at once?
You seem to be using Windows.
The problems you are having relate to the traditionally wonky FileSystem locking behavior that is unique to Microsoft Windows (no other OS that runs Java does this)
See official documentation about it at
https://www.eclipse.org/jetty/documentation/current/troubleshooting-locked-files-on-windows.html
If you follow the advice laid out in that documentation then you'll not need to stop/start a specific webapp.
Important: Note that the advice in the documentation is for DEVELOPMENT TIME ONLY and is not a good general configuration for production.
Insert from OP:
I followed the directions in the docs above, and it worked! Here's what I did:
Find your webdefault.xml file.
Mine was in C:\Place_where_Jetty_was_installed\Jetty\etc\
Open it and search for UseFileMappedBuffer
Find this:
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>true</param-value>
</init-param>
Set param-value to false
<param-value>false</param-value>
That being said, if you still want to go down this path, there's 2 ways ...
1. Use hotreload
Create an XML deployable for your "reload" webapp and touch it to hot reload just that 1 webapp.
The File: ${jetty.base}/webapps/myapp.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
"http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/myapp</Set>
<Set name="war"><Property name="jetty.webapps"/>myapp.war</Set>
</Configure>
Then to make jetty reload it just ...
$ touch /path/to/myjettybase/webapps/myapp.xml
This standard Posix command will update the timestamp of that file, which will be seen by Jetty as "hey, that file updated, I must reload it"
2. Use JMX to stop/start a specific webapp
Start Jetty with the JMX module active (--module=jmx).
Start a JMX console (the JDK ships with jmc and jconsole) and connect to your running Jetty instance. Find the MBean for your specific webapp and use the stop() and start() commands on that specific webapp.
I just moved my CFWheels app from CF9 to CF11 and I've lost the REST urls from my previous setup.
For example before I had example.com/controller/view and now I get example.com/index.cfm?controller=foo&action=bar
The weird thing is that when I hardcode the url in it doesn't convert it or throw an error.
Is there a setting in the administrator's panel that I should check? I did a comparison with my previous setup but I have't found anything.
This is what I did to get it to work.
I uncomented the xml code inside web.config in the root of my application. Set the <directoryBrowse enabled="true" /> renamed the htaccess and ISAPIrewrite4.ini. Then restarted the server and Coldfusion through services.
I think the trick happened when I renamed the two files that were unnecessary for my setup (htaccess for apache and ISAPI rewrite for IIS 6).
Good luck to anyone running through this issue :)
I've run into an interesting problem that I never encountered with XP or IIS 6.
Basically, I can't get a native Delphi (WebBroker) Web service server to work with a native Web service client in Windows 7 64-bit.
Here's the most basic breakdown. If I create a new Web service application in Delphi 2010 (or any version, back to Delphi 7), and access it using IE 8, I can see the HTML that the WSDLHTMLPublish component creates, but I can never get to the SOAP. In the same way, the WSDL Importer cannot get to the SOAP either. (I have IIS 7 configured to use a 32-bit application pool, and I have created a working Script Map to the Handler Mappings. In short, the 32-bit ISAPI Web service is running).
For example, I have a simple Web service server named TestService (created using the default sample interface generated when you create a new Web service server).
I installed it in a virtual directory named scripts.
If I enter http://localhost/scripts/TestService.dll/wsdl, IIS 7 displays the page http://localhost/scripts/TestService.dll.
If I put my mouse over the WSDL link for the ITestService, I see http://localhost/scripts/TestService.dll/wsdl/ITestService in the status bar. However, when I click this link, the address bar shows http://localhost/scripts/TestService.dll/wsdl/ITestService, but I see only the HTML from http://localhost/scripts/TestService.dll. There seems no way to get to the SOAP definition. IIS 7 seems to be ignoring everything after the script name (it is ignoring the pathinfo).
Additional evidence that IIS7 is stripping off the pathinfo is that if I pause my mouse over the ITestService link, the statusbar shows http://localhost/scripts/TestService.dll?intf=ITestService. Clicking that link takes me to another HTML page, the one associated with http://localhost/scripts/TestService.dll?intf=ITestService. However, any link that includes a pathinfo following the script name, takes me simply to http://localhost/scripts/TestService.dll.
I have tested this in Delphi 7, Delphi 2010, and Delphi XE, with the same results.
I am guessing that IIS7 is stripping off the pathinfo, since even the WSDL Importer cannot get to the SOAP definition.
Tried creating a new Web service using the CGI option, and got the same result.
Have any idea what is going on?
Added: Bob Swart reports he has had no problems under Windows 7 32-bit. Downloading the 32-bit OS and will try that (in a new VM).
The problem was that I had created a specific script mapping in the Handling Mappings for the ISAPI dll. This caused IIS to redirect all requests to the specific dll, which was why any request that included an info path part was ignored. The info path was stripped off.
What I really needed to do is to simply enable the Execute feature permission of the ISAPI-dll module mapping handler mapping. This module mapping is available for a virtual directory once you have allowed unspecified ISAPI modules (or CGI modules, if that is the kind of Web server extension you have created).
To fix my problem, I needed to
Delete the directory whose handling mappings I has messed up.
Since I already had allowed unspecified ISAPI modules (select Edit Feature Settings from the ISAPI and CGI Restrictions applet from the IIS section of the server), I then needed to add a new virtual directory for the appropriate Web site (here is where I recreated the directory that I deleted in previous step 1.
From the Handling Mappings applet for the virtual directory, you probably have the ISAPI-dll handling mapping disabled. Select it and select the Edit Feature Permissions option on the right-hand side. Enable the Execute checkbox.
Don't edit the ISAPI-dll handling mapping and add an Executable. Even though this dialog box says that Executable is optional, once you've added one, it's over. You can never remove it (I could never remove it). On one of my VM installs I had an Executable entry on this dialog box. In order to get rid of it, I had to uninstall IIS 7 and then reinstall it. (Maybe this wasn't necessary, but I could not figure out how to remove and reinstall a module mapping without entering the Executable entry).
Additionally, if your ISAPI DLL is a 32-bit DLL, and you're working in a 64-bit operating system, you need to enable 32-bit applications for the associated application pool.
I hope my pain has helped someone.
I know that this question is a little bit old, but this answer might help someone with the same problem.
When you add the Script Map in the IIS Manager it creates the handler in the web.config like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Execute, Script">
<add name="MyISAPI" path="myisapi" verb="*" modules="IsapiModule" scriptProcessor="C:\MyISAPI\myisapi_extension.dll" resourceType="Unspecified" requireAccess="Execute" preCondition="bitness32" />
</handlers>
</system.webServer>
</configuration>
What you need to do is to add the attribute allowPathInfo="true" to the handler. The IIS Manager doesn't have this option and you have to edit web.config manually:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Execute, Script">
<add name="MyISAPI" path="myisapi" verb="*" modules="IsapiModule" scriptProcessor="C:\MyISAPI\myisapi_extension.dll" resourceType="Unspecified" requireAccess="Execute" preCondition="bitness32" allowPathInfo="true" />
</handlers>
</system.webServer>
</configuration>
This way you can choose the request path of the ISAPI extension (in this example: http://HOSTNAME/MyISAPI/myisapi), otherwise without this change you will need to call the ISAPI extension with the name of the DLL (http://HOSTNAME/MyISAPI/myisapi_extension.dll)
I am trying to create simple flex application, which uses django as a back-end part. Have a question:
Usually when I run my application Flex Builder creates a file in a directory on my local PC and then opens a browser and points to it. Everything was fine, but when I decided to link django server to flex applications via xml data providers I started to get security errors. (Related to absence of crossdomain.xml). When I created the file and put it on the server:
<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
<allow-access-from domain="http://127.0.0.1:8000"/>
<allow-access-from domain="127.0.0.1"/>
</cross-domain-policy>
Then tried the application again, I got error in console of my FB Error: Request for resource at http://127.0.0.1:8000/go/active/ by requestor from file:///Users/oleg/Documents/FB3/usersList/bin-debug/usersList.swf is denied due to lack of policy file permissions.
I don't know how to fix the error. But also the question is there a way to configure FB3 to put my swf files to the server directly, so I will not need any crossdomain?
Thanks
Oleg
We struggled with this a lot. The Flex security stuff didn't strike me as well built, but perhaps we just had different approaches in mind than Adobe's developers. The solution that worked for us was to serve both the SWF and the dynamic data from the same host and port.
On our development boxes, we tell Apache to serve the SWF from a directory in the workspace, and the dynamic data from a local copy of the app. When we push to production, SWF and app get pushed simultaneously to the same virtual host.
If that's inconvenient for you, the Apache ProxyPass directive can be used to make Apache front for other servers. I've not used that in production, but it's been very handy for developer setups.
I don't know a way to get FlexBuilder to automatically deploy your changed SWF; you could certainly look into an automation approach (like Maven and Flex-Mojos) to make that happen.
That said, getting rid of that error is usually just a matter of adding a policy file to the server.
The second error is caused because you're trying to fetch http resources from a "file" location. My recommendation is that you change your Flex Builder project so it outputs to a location within the Django web site, rather than to the flex-bin directory. This setting can be changed in the properties dialog of the project. Then, you should be able to have your front-end and back-end share the same protocol and domain.