Search Results

Search found 373 results on 15 pages for 'subdirectories'.

Page 3/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Relative path incorrect in the view layer when hosting a rails3 app in a subdirectory using passenger and apache

    - by Saifis
    I want to host multiple Rails apps on a multiple server using sub-directories. And have encountered some relative path problems. I have made a symbolic link to the app's public directory and placed it in the /var/www/html directory, var/www/html/ /test_app (symbolic link to the public folder of test_app) and set apache as so LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12 PassengerRuby /usr/local/bin/ruby <VirtualHost *:80> ServerName test.com DocumentRoot /var/www/html Options Indexes FollowSymLinks -MultiViews RailsBaseURI /test_app </Location> </VirtualHost> The links in the app itself works just fine, all the links acknowledge the test_app/ directory and work, however, when it comes to showing images in the public directory in the view, the relative path goes wrong. Say I have /system/files/1/aaa.png it goes looking for it in /var/www/html/system/files/1/aaa.png rather than /var/www/html/test_app/system/files/1/aaa.png As far as I understand this is an Apache setting problem than something to be done in Rails, if its possible I would prefer to have it contained in the conf file of apache rather than having to alter the code.

    Read the article

  • Strategy to isolate multiple nginx ssl apps with single domain via suburi's?

    - by icpu
    Warning: so far I have only learnt how to use nginx to serve apps with their own domain and server block. But I think its time to dive a little deeper. To mitigate the need for multiple SSL certificates or expensive wildcard certificates I would like to serve multiple apps (e.g. rails apps, php apps, node.js apps) from one nginx server_name. e.g. rooturl/railsapp rooturl/nodejsapp rooturl/phpshop rooturl/phpblog I am unsure on ideal strategy. Some examples I have seen and or thought about: Multiple location rules, this seems to cause conflicts between the individual app config requirements, e.g. differing rewrite and access requirements Isolated apps by backend internal port, is this possible? Each port routing to its own config? So config is isolated and can be bespoke to app requirements. Reverse proxy, I am little ignorant of how this works, is this what I need to research? is this actually 2 above? Help online seems to always proxy to another server e.g apache What is an effective way to isolate config requirements for apps served from a single domain via sub uris?

    Read the article

  • Rails: Single Table Inheritance and models subdirectories

    - by Chris
    I have a card-game application which makes use of Single Table Inheritance. I have a class Card, and a database table cards with column type, and a number of subclasses of Card (including class Foo < Card and class Bar < Card, for the sake of argument). As it happens, Foo is a card from the original printing of the game, which Bar is a card from an expansion. In an attempt to rationalise my models, I have created a directory structure like so: app/ + models/ + card.rb + base_game/ + foo.rb + expansion/ + bar.rb And modified environment.rb to contain: Rails::Initializer.run do |config| config.load_paths += Dir["#{RAILS_ROOT}/app/models/**"] end However, when my reads a card from the database, Rails throws the following exception: ActiveRecord::SubclassNotFound (The single-table inheritance mechanism failed to locate the subclass: 'Foo'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Card.inheritance_column to use another column for that information.) Is it possible to make this work, or am I doomed to a flat directory structure?

    Read the article

  • WordPress MU for hosting subdirectories

    - by Jon Lebensold
    Hi there, I'm trying to consolidate two WordPress installations into one WP MU install. Basically, I have example.com/blog and example.com/microsite/blog I'd like the microsite's blog and the /blog to both be hosted by WordPress MU. Does sunrise help me accomplish this? If not, how would I do this? Thanks!

    Read the article

  • Batch rename file extensions, including subdirectories

    - by Alan
    I'm renaming empty file extensions with this command: rename *. *.bla However, I have a folder with hundreds of such subfolders, and this command requires me to manually navigate to each subfolder and run it. Is there a command that I can run from just one upper level folder that will include all the files in the subfolders?

    Read the article

  • Does mod_rewrite in subdirectories' .htaccess override higher levels?

    - by Ryan
    I'm using mod_rewrite to map my old directory structure to a new one. I have the following rule in my top-level .htaccess file, and it works: RewriteEngine On RewriteCond %{REQUEST_URI} /blog/archives/(.*) RewriteRule ^.*$ /archives/%1 [L,R=301] As you can guess, this takes http://example.com/blog/archives/00001.php and redirects it to http://example.com/archives/00001.php. But when I add these rewrite rules to the .htaccess file in the /blog directory RewriteEngine on RewriteRule atom.xml$ /atom.xml [L,R=301] the top-level redirect no longer works. If I move the rule in the /blog .htaccess file to the top-levle file both rules work. Can someone explain what is happening here?

    Read the article

  • How to make a proper index page for subdirectories in CodeIgniter

    - by iamdadude
    I'm building an app that has a section for consumers and businesses, and I want to separate the controllers folder appropriately, so it looks like this - http://domain.com/users/signup/ http://domain.com/business/signup/ I have it working by creating a separate folder for each section in the "controllers" folder, but I want to know how to make an appropriate page when the user visits the http://domain.com/users/. It currently just loads the homepage. How can I fix this?

    Read the article

  • IIS URL Rewrite rule - Default document for subdirectories

    - by Antonio Bakula
    I would like create URL rewrite rule that will set default document for my virtual folders. eg. someting like this www.domain.com/en/ -> www.domain.com/en/index.aspx www.domain.com/hr/ -> www.domain.com/hr/index.aspx www.domain.com/de/ -> www.domain.com/de/index.aspx directories en, hr, de doesn't really exists on web server they are just markers for languange used in site used by home grown http module that will rewrite path with query params. Quick solution was define rule for every single lang, something like this : <rewrite> <rewriteMaps> <rewriteMap name="Langs"> <add key="/en" value="/en/index.aspx" /> <add key="/hr" value="/hr/index.aspx" /> <add key="/de" value="/de/index.aspx" /> </rewriteMap> </rewriteMaps> <rules> But I would really like solution that would not require changes in web.config and adding rewrite rule for every languange used on particular site. Thanks !

    Read the article

  • Detach many subdirectories into a new, separate Git repository

    - by prisonerjohn
    This question is based on http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository Instead of detaching a single subdirectory, I want to detach a couple. For example, my current directory tree looks like this: /apps /AAA /BBB /CCC /libs /XXX /YYY /ZZZ And I would like this instead: /apps /AAA /libs /XXX The --subdirectory-filter argument to git filter-branch won't work because it gets rid of everything except for the given directory the first time it's run. I thought using the --index-filter argument for all unwanted files would work (albeit tedious), but if I try running it more than once, I get the following message: Cannot create a new backup. A previous backup already exists in refs/original/ Force overwriting the backup with -f Any ideas? TIA

    Read the article

  • PHP / Windows - Opendir() fails opening subdirectories within symbolic linked directories

    - by John Himmelman
    Does anyone know a solution to this problem? I'm unable to open a subdirectory within a symboliclink'd directory. I've confirmed that the paths are correct (even copy & pasted the path into explorer, which parsed it fine). This is a strange, annoying, bug :|. Example: C:\folder\symbolic_link\dir1\dir2 - opening dir2 fails. C:\folder\symbolic_link\dir1 - works C:\folder\real_directory\dir1\dir2 - works C:\folder\real_directory\dir1 - works

    Read the article

  • htaccess: how to prevent infinite subdirectories?

    - by Vincent Isles
    My .htaccess at the root directory contains this: Options -MultiViews +FollowSymlinks -Indexes ErrorDocument 404 /404.htm RewriteEngine On RewriteBase / followed by a bunch of RewriteRules. The .htaccess at the /forum subdirectory contains this: RewriteEngine On RewriteBase /forum RewriteRule ^index.html$ index.php [L,NE] RewriteRule ^(.*)-t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L] RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L] followed by other rules mapping SEO-friendly URLs to the true URLs. mydomain.com/forum/a-thread-t-1.html returns the page showthread.php?tid=1 but so does mydomain.com/forum/forum/a-thread-t-1.html, mydomain.com/forum/forum/forum/a-thread-t-1.html and so on. I don't want this behavior - I want pages accessed as /forum/forum/* to return a 404. Any hint on where I had been wrong?

    Read the article

  • WordPress > microsites use main site's menu (same domain, multiple subdirectories, multiple WP insta

    - by Scott B
    I have a main site at site.com and several subdirectory "microsites" at site1.site.com, site2.site.com, etc. These are all on the same server. Each site is set up in its own folder under public_html and each with its own separate wordpress install. I'd like for each microsite to share the same top level menu (the page's menu) with the main site. I'm sure there are several approaches and I'd like to ask you for a few ideas. As an aside, I'd also like to ask if the new WordPress 3.0 beta would make this simpler to do (since it combines wordpress MU into the main wordpress core)

    Read the article

  • list all files from directories and subdirectories in Java

    - by Adnan
    What would be the fastest way to list the names of files from 1000+ directories and sub-directories? EDIT; The current code I use is: import java.io.File; public class DirectoryReader { static int spc_count=-1; static void Process(File aFile) { spc_count++; String spcs = ""; for (int i = 0; i < spc_count; i++) spcs += " "; if(aFile.isFile()) System.out.println(spcs + "[FILE] " + aFile.getName()); else if (aFile.isDirectory()) { System.out.println(spcs + "[DIR] " + aFile.getName()); File[] listOfFiles = aFile.listFiles(); if(listOfFiles!=null) { for (int i = 0; i < listOfFiles.length; i++) Process(listOfFiles[i]); } else { System.out.println(spcs + " [ACCESS DENIED]"); } } spc_count--; } public static void main(String[] args) { String nam = "D:/"; File aFile = new File(nam); Process(aFile); } }

    Read the article

  • Best practice for making code portable for domains, subdomains or directores

    - by Duopixel
    I recently coded something where it wasn't known if the end code would reside in a subdomain (http://user.domain.com/) or in a subdomain (http://domain.com/user), and I was lost as to the best practice for these unknown scenarios. I could thinks of a couple: Use absolute paths (/css/styles.css) and modrewrite if it ends up being /user Have a settings file and declare a variable with the path (<? php echo $domain . "/css/styles" ?>) Use relative paths (../css/styles.css). What is the best way to handle this?

    Read the article

  • Moving and renaming files, keeping extension but include sub directories in batch file

    - by Ser1esII
    Forgive me if this is nor the place to ask these questions, I am new to batch and scripts and a bit new to these kind of posts... I have a folder that will receive files and folders, I want to run a script that looks at the directory and renames all files in each subfolder numerically, and moves them if possible. For example I have something that looks like the following Recieved_File_Folder |_folder1 | |_file1.txt | |_file2.bmp |_folder2 | |_file4.exe | |_file5.bmp |__file9.txt |__file10.jpg I would like to be able to look in every directory and move it to something like this, keeping in mind the names of the files will be random and I want to keep the extension intact also. Renamed_Folder |_folder1 | |_1.txt | |_2.bmp |_folder2 | |_1.exe | |_2.bmp |__1.txt |__2.jpg I have spent alot of time on this and am not doing too well with it, any help would be very greatly appreciated!! Thank you in advance!

    Read the article

  • Using htaccess rewrite to make a subdirectory be its own root for root relative path requests

    - by Scott
    Can I use htaccess to capture requests from a certain subdirectory and make that directory use itself as the root directory for any root relative path requests? For example if I have... http://www.example.com/subFIXED/subANY/restofpath ...where subFIXED is always the same directory, subANY is any immediate subdirectory of subFIXED, and I want a redirection of all href/src requests from any file under subANY to use subANY as the 'root' (sort of like a subdomain), in effect having root level requests use this as the root directory level: http://www.example.com/subFIXED/subANY/ Instead of this: http://www.example.com/ I'm assuming I can put an htaccess file in subFIXED to handle all calls coming from anything under any subANY, but not being very familiar with htaccess rewriting, variables, etc., I can't figure out how to capture which subANY directory is making the root level request and then use that capture to make a rewrite to consider that directory the root level of any root relative path requests from it. Thanks for your help

    Read the article

  • In Sinatra, how can I serve static index.html files in subdirectories in public folder?

    - by socrateos
    I noticed that Sinatra does not recognize index.html files in public folder's subdirectories and returns an error when url is pointing to a directory without specifiying the file name. For example, if user enters a url like "www.mydomain.com/subdiretory/", Sinatra fails to recognize the existence of an index.html file in that directory. There are hundreds of subdirectories in my public folder so that it is impossible to specify each one of them in code (and the number of subdirectories keeps growing). How can I tell Sinatra to leave my web server (Apache) alone (to server index.html file) if there is an index.html file in a subdirectory of public folder when url is pointing to that directory without the file name?

    Read the article

  • How can I resize images in multiple subdirectories more effectively?

    - by jtfairbank
    I have the original images in a directory structure that looks like this: ./Alabama/1.jpg ./Alabama/2.jpg ./Alabama/3.jpg ./Alaska/1.jpg ...the rest of the states... I wanted to convert all of the original images into thumbnails so I can display them on a website. After a bit of digging / experimenting, I came up with the following Linux command: find . -type f -iname '*.jpg' | sed -e 's/\.jpg$//' | xargs -I Y convert Y.jpg -thumbnail x100\> Y-small.jpg It recursively finds all the jpg images in my subdirectories, removes the file type (.jpg) from them so I can rename them later, then makes them into a thumbnail and renames them with '-small' appended before the file type. It worked for my purposes, but its a tad complicated and it isn't very robust. For example, I'm not sure how I would insert 'small-' at the beginning of the file's name (so ./Alabama/small-1.jpg). Questions: Is there a better, more robust way of creating thumbnails from images that are located in multiple subdirectories? Can I make the existing command more robust (for example, but using sed to rename the outputted thumbnail before it is saved- basically modify the Y-small.jpg part).

    Read the article

  • How do I map some subdirectories to run alongside a Drupal site?

    - by paradroid
    I have a Drupal site running on Apache using the following vhosts file: <VirtualHost xx.xx.xx.xx:80> ServerName bananas.net ServerAlias www.bananas.net DocumentRoot /var/www/drupal/ RewriteEngine On RewriteCond %{HTTP_HOST} !=bananas.net [NC] RewriteRule ^(.*)$ http://bananas.net$1 [L,R=301] <Directory /var/www/bananas.net/> Options -Indexes FollowSymlinks AllowOverride All Order allow,deny Allow from all </Directory> CustomLog ${APACHE_LOG_DIR}/access.log combined ErrorLog ${APACHE_LOG_DIR}/error.log </VirtualHost> I set it up some time ago, so I am not sure what the <Directory /var/www/bananas.net/> directive was meant for. That directory is currently empty. With the vhosts file the way it is, does the Directory directive have any effect at all? I want to add some content which is separate from the Drupal site. How do I add sub-directories within /var/www/bananas.net/ which can be accessed alongside the Drupal site running at the root? As they have nothing to do with the Drupal site, I want to keep the files separate, but still using the same domain.

    Read the article

  • What should be the correct ownership of /tmp /var /usr and subdirectories?

    - by sbergeron
    For some reason I think the permissions of those were messed up from a small amount of disk corruption I had. This may be a dupe, I don't know but I googled it and didn't find any mention of it. I need to know how the permissions of them should be set up as currently my computer can't actually use the tmp directory and I can't download anything consequently. I have access to the recovery mode command line but while in sudo user prompts it doesn't seem to work correctly. Also something is wrong with package management and I get dpkg: error: unable to access dpkg status area: read-only file system. I know my system is really messed up but I don't want to have to reinstall AGAIN.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >