WebFaction
Community site: login faq

Hi,

I've the following domain: www.xtarafa.cat

And also I've an static app under xtarafa/webapps/htdocs/xtarafacat

How can I point the domain to that subdirectory?

Thanks !

Xavi

asked 17 Sep '13, 17:10

xtarafa
323
accept rate: 0%


Create a symbolic link application via our control panel, using /home/xtarafa/webapps/htdocs/xtarafacat as the symlink path.

Then, assign the symlink app to the root of your site, again via our control panel.

Hope that helps!

permanent link

answered 17 Sep '13, 19:04

seanf
12.2k41836
accept rate: 37%

Isn't posible to has more than one donain and website inside a single htdocs static application?

(18 Sep '13, 15:32) xtarafa

Sure, it's possible. For your example, you would use our control panel to make a site that serves your htdocs application on your www.xtarafa.cat subdomain, and then put the following in ~/webapps/htdocs/.htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.xtarafa.cat$ [NC]
RewriteCond %{REQUEST_URI} !^/xtarafacat/
RewriteRule ^(.*)$ /xtarafacat/$1 [P,L]

But why would you want to? The extra htaccess directives incur a performance hit on your site, and running another static/cgi/app or a symlink app doesn't really count towards your RAM, storage, or bandwidth quotas. It's much easier to think of ~/webapps as your web root and then create applications for each thing that you want to serve.

(18 Sep '13, 16:13) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×128
×37
×15

question asked: 17 Sep '13, 17:10

question was seen: 3,094 times

last updated: 18 Sep '13, 16:13

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM