0

I'm a student developer working for a college doing dev work for 1 department (~11 sites).

The current workflow is as follows:

  • SFTP into the staging server
  • edit files
  • when done, use a web utility to "transfer" files form staging to live production server.

This is incredibly tedious, and I'd prefer to setup a local LAMP environment to develop, then rsync the changed files up to the staging, then use the web utility to transfer to production.

I'm unsure how to go about replicating the domain structure of the server, as one server handles many 2nd-level domains.

server directory structure:

/
  apache/
  etc/
  web_www/
    home/
      w-abc/
        www/
          index.php

above illustrates the directory structure of the server. If I wanted to get to index.php of site w-abc on the staging server, I would type into my browser

www-staging.universityName.edu/mainDepartment/subDepartment/index.php

OR

www-staging.universityName.edu/~w-abc/index.php

of course, there are many many domains inside of the /web_www/home/ directory, with a similar naming structure (w-abc, w-123 etc)

How can I map my local server to a similar structure? I would like to be able to have the exact same structure, just locally. So I'd like to be able to go to http://localhost/mainDepartment/subDepartment/index.php and http://localhost/~w-abc/index.php and have it be the same thing.

tdc
  • 99
  • 6

1 Answers1

1

Use rsync to copy the directory structure of the site, then make sure you pick up the configuration files as well since those are important for the bits like ~w-abc.

John
  • 9,070
  • 1
  • 29
  • 34
  • which configuration files specifically do I need for those important bits? Sorry, newb to servers :) – tdc Oct 01 '14 at 16:28
  • The Apache config files. On Red Hat and derivatives, they're usually found in `/etc/httpd/conf[.d]` – John Oct 01 '14 at 16:29
  • The server is Solaris10 with "Solaris containers/zone technology for isolation of environments" (according to our tech page). I don't see an `httpd` directory in `/etc/` – tdc Oct 01 '14 at 16:33
  • Solaris is different from Red Hat. Find the directory with `httpd.conf` and look in there or one level above. – John Oct 01 '14 at 16:35
  • The closest I can find is `/etc/apache2/httpd-std.conf` and nothing in it jumps out at me as allowing that bit of configuration – tdc Oct 01 '14 at 16:45
  • Look in `/etc/apache2` and subdirectories for other config files/directories. – John Oct 01 '14 at 16:47
  • `envvars`, `httpd-std.conf`, `magic`, `mime.types.new`,`ssl.conf`, `highperformance-std.conf`, `httpd-std.conf.new`, `magic.new`, `ssl-std.conf`, `ssl.conf.new`, `highperformance.conf`, `httpd.conf-example`, `mime.types`, `ssl-std.conf.new` -- those are all the files in `/etc/apache2` and there are no subdirectories (thank you for your help btw) – tdc Oct 01 '14 at 16:53