I'm trying to set up a simple, temporary 'System Maintenance in Progress' page. On my local host (W2K8 IIS 7), I just add App_Offline.htm at the top of the Default Document list in IIS
When I drop the file into my web root folder and load the site - the App_Offline.htm page loads. When I remove the file from the web root...Site loads as usual.
When I replicate this on our actual production web server (Win2K8 - IIS7 also), the App_Offline.htm never gets loaded.
The app is ASP.Net 4 and I do NOT have a defaultdocuments section in my web.config.
TIA - tom
Problem solved:
The file has to be named App_Offline.htm, which it was on my local box, but we didn't have the same file name on the web server.
Related
I am editing a website using the Plone 4 CMS. The Plone instance I am currently using is hosted by a server to which I don't have access (i.e. I can't FTP this server and edit PHP files).
Although I don't own the server which is hosting this website, I would like to access the buildout.cfg file. Is there a way to edit this file by just logging in on my Plone website, or do I need to have the credentials to manipulate the whole instance of the site with FTP?
When I log in, I can go to a page called Site Setup (screenshot provided). Can I perhaps solve my problem from this page?
Theoretically it's possible, the code-example below shows a prototype using a browser-view, which when called:
Reads the content of a given page
Writes the content to the buildout-config
Updates the instance
Practically:
You'd need to have access to the file-system, to install an add-on with the browser-view beforehand.
One would never want to do this in production, because if errors occur you
cannot do much about it then.
import os
from Products.Five.browser import BrowserView
class View(BrowserView):
def __call__(self):
# Let's assume these paths exist:
instance_path = '/path/to/instance'
buildout_config_path = instance_path + 'buildout.cfg'
page_path_in_site = 'front-page'
# Read buildout-config of page in site:
page = self.context[page_path_in_site]
config_content = page.getText()
# Write buildout-config to filesystem:
with open(buildout_config_path, 'w') as fil:
fil.write(page.getText())
# Run buildout, so changes in config take effect:
os.system(instance_path + 'buildout')
# Restart server, so python- and zcml-files get
# (re-)compiled, respectively loaded:
os.system(instance_path + 'bin/instance restart')
You can't. The buildout.cfg file is used for installing / building your application. So, when you are in Site setup you already are using the running application you want to reconfigure.
You will edit your buildout.cfg then you will run ./bin/develop rb to rebuild it, then you will (re)start the instance of your application. This is when, for example, you will see new add-ons available for activating them from Site setup / Add-ons (the add-ons you added in eggs / zcml / versions sections of your buildout.cfg).
I'm trying to create file system of my website in my local machine and I have configured static replication agent in author following this http://www.wemblog.com/2012/02/how-to-use-static-agent-in-cq-wem.html document.
When I click activate on a page nothing is getting created in the target folder. In logs, it is showing NOTHING TO REPLICATE for all the pages.
I tried the same agent with geometrixx site and the content is created for it.
Help me with the solution. Thanks in advance
Have you set the rules for your content branch ? Static agent configuration allows you to define the rules on the 2nd tab (Rules).
By default only sample Geometrixx websites are configured
/content/geo* ${path}.html?wcmmode=preview
/content/dam* ${path}
/content/geo* /content/geometrixx/en.topnav.html
/etc/designs/* ${path}
Make sure to add /etc/designs/* ${path}
Currently when I type in the URL of my webapp, say "http://abc.edu/mywebapp/", I am taken to the login page of my webapp. When I type "http://abc.edu/", I am taken to the GlassFish info page. How can I do it such that when I key in "http://abc.edu/", I will be taken to my login page and not the GlassFish info page?
Option 1: You can set one of your webapps as default. This can be done with the admin console:
Configuration --> Virtual Servers --> server
Then select your default web application from the drop-down menu. If your webserver port is 8080, you can start your application now by:
http://hostname:8080
instead of http://hostname:8080/webapp
Notice that "server" is the name of Glassfish's default virtual server. If you configured a different virtual server for your webapp you need to change it accordingly.
Furthermore regarding this source, there might be some problems with JDBCRealms.
Option 2: You could also deploy your default webapp to "/" instead of "/webapp" but I think the first option is more flexible.
You need to change your context root to "/" Edit the application.xml that is where the context root for the app is set. You might have to undeploy the default context root inorder to do that (that is what I do in JBoss, I undeploy ROOT.war).
Cannot access static resources Asp.Net Mvc 2 on IIS 7. when configured a Virtual Host.
I've set the following:
In hosts.etc I've written the following "127.0.0.1 localhost blueprint"
I've create in IIS 7 set the directory root to where the MVC 2 application is located and set the domain host name to blueprint over http and port 80.
I can open the site normally by going to http://blueprint , all MVC 2 functionalities work fine.
But the CSS won't load, everytime the system returns the error 404 status for a resource not found.
The css file is located in here /Views/Shared/screen.css .
I've tried the following to get a proper path:
Url.Content("~/Views/Shared/screen.css")
Url.Content("/Views/Shared/screen.css")
Url.Content("Views/Shared/screen.css")
Or just
"~/Views/Shared/screen.css"
"/Views/Shared/screen.css"
"Views/Shared/screen.css"
or
"screen.css".
The css file is requested from a master page located in the same directory as the screen.css file , Views/Shared/master.master .
I just ran into this not 5 minutes ago. I fixed it by going into "Turn Windows Features On or off" in the control panel then "Internet Information Services" "World Wide Web Services" and make sure "Static Content" is checked.
I have setup TYPO3 successfully on my local server. But I am having problem when clicking on any menu item: It's showing "url not found on server".
When I type in the URL manually into the browser it shows the page. It's only having problems when redirecting after clicking on a page item at any frontend website page.
That might be related to the domain config or RealURL... or both ;)
Do you use RealURL? Or do you use the standard url config?
If links to sub pages look like index.php?id=12345 you are using the standard config.
My guess is that the local DNS ("hosts file") is not configured correctly.
With the hosts file you can simulate how the web site will appear when it's online, hooked up to a "real/global" DNS. (Not quite, but in a nutshell)
So if you set up Typo3 to be reached under http://www.example.com/ you need to tell your local DNS ("hosts file") to route a request to http://www.example.com/ to your local host e.g. http://127.0.0.1/ . In that case your host file needs an entry like so:
127.0.0.1 http://www.example.com/
What Domain do you enter to reach your web site? Where do the links from the menu link to?
If you wanna know mor about the "hosts file" look here:
http://accs-net.com/hosts/how_to_use_hosts.html
If you can log in into the TYPO3 backend (/typo3/) and can access the frondend through /index.php, but not through the generated menu links, then RewriteRules for mod_rewrite don't apply.
Usually TYPO3's installer should detect this configuration and disable RealURL, which is responsible for generating such nice looking URLs (instead of index.php?id=123). It seems like this failed (or you copied everything afterwards without the .htaccess file?).
Make sure that you have TYPO3's .htaccess file in place in the root directory of your installation. If this is the case, make sure that mod_rewrite is enabled in your Apache config.