0

Is there a way to change gwan's default behavior of naming your site with the pound character and virtual hosts with the dollar sign. So many of my development tools have consistent problems accessing directories with # and $ in the file name. Shell scripts have problems, ftp clients have problems... I'm hoping there is a way to change those default characters to something else. Or is there some linux change I need to make for it to be more friendly? I'm not a linux expert by any stretch, but I have seen several threads talking about how using those characters is discouraged.

I'm sure there must be pros and cons to using those characters, I just don't know what the pros are.

  • EDIT *

As it turns out, the problem was simply permissions. My 0.0.0.0_8080 directory and below was root:root My tools were logged in as a different user. Guess I was too wrapped up in the use of $ and # to see the real problem.

Gil
  • 3,279
  • 1
  • 15
  • 25
sday
  • 1,041
  • 14
  • 22

2 Answers2

2

For that to be possible it would break one of the most interesting aspects of GWAN: no configuration files. And it would create a point of failure.

To access the directories on a terminal just escape the beginning of the virtual host path with '\' like cd \$yourvirtualhost.com

This also works on sftp commands. If you want a graphics tool use FileZilla it works perfectly for me.

Paulo Melo
  • 176
  • 1
  • 1
  • Thanks for the tip. How is it that those characters in the directory name give it the zero config capability. Why is that not possible without those characters? – sday Feb 12 '13 at 23:25
  • Well you need to differentiate between hosts, virtual hosts and aliases. On GWAN they are defined on the file system. On the other hand on apache you need to write down several lines on configuration files to give instructions to the server. I believe that it's quicker and easier to use the file system directory structure. – Paulo Melo Feb 13 '13 at 09:15
  • I certainly like the idea and agree. I'm just confused as to why the $ and # offer some unique capability. If the directories were prefixed with 'gwan_' wouldn't that accomplish the same thing? I assume the gwan executable is just searching for something unique like the $ or # in the directory name to know the directory is of special importance. Or does the $ and # give some unique capability? – sday Feb 13 '13 at 23:32
  • Yes you are right, it could be possible to use something like gwan_ and vhost_ or other names. But $ and # are just simpler. Shouldn't we just go for the most simplest solution? ;) since they are characters not allowed on host names they are perfect for the purpose. – Paulo Melo Feb 14 '13 at 08:26
  • I have to admit, that since from what I'm reading the goal is to be config file free, those characters do have appeal. I don't know enough about the issues they can create, but I'm sure the chief architect of gwan knows what he's doing, so I'm guessing the use of those characters is probably just fine. Thanks again for the feedback. – sday Feb 14 '13 at 15:34
0

The answer by Paulo was informative, but I wanted to put closure on the actual question so the answer appears to be that you cannot change the default characters of $ or # for the host and virtual host names. The problems I described in the question had nothing to do with gwan, but with my own misconfigured user/groups. My 0.0.0.0_8080 directory and below was root:root My tools were logged in as a different user. Guess I was too wrapped up in the use of $ and # to see the real problem.

fwiw

sday
  • 1,041
  • 14
  • 22