Skip to content

Commit

Permalink
πŸš€ Update for new Server and move Public Folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradSollitt committed Dec 27, 2021
1 parent 114af98 commit 41de7bd
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/Playground Server Setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ unzip 1.0.0.zip
cp -r ~/playground-master/app /var/www/app
cp -r ~/playground-master/app_data /var/www/app_data
cp -r ~/playground-master/scripts /var/www/scripts
cp -r ~/playground-master/html/. /var/www/html
cp -r ~/playground-master/public/. /var/www/html

# Copy FastSitePHP Framework
# Note - Normally this would be installed using [scripts/install.php], however
Expand Down
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// redirects to the [html] directory which is used as the
// public root directory on the production web server.

// On the main site the public web location is [/var/www/html]
// On the main site the public web location is [/var/www/public]
// so the [.htaccess] files for user sites are configured for the
// specific path, because this site uses specific [.htaccess] files
// running in development is recommended for the PHP built-in Web Server
Expand All @@ -18,11 +18,11 @@
// php -S localhost:3000
//
// Then open your web browser to:
// http://localhost:3000/playground/html/
// http://localhost:3000/playground/public/
//
// This assume the following folder structure:
// - fastsitephp "Root Directory"
// - fastsitephp Repository
// - playground Repository (this project)

header('Location: html/');
header('Location: public/');
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/app-quick-site-create.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

// Build a random hex string for the site
$site = bin2hex(random_bytes(10));
$copy_to = __DIR__ . '/../html/sites/' . $site . '/';
$copy_to = __DIR__ . '/../public/sites/' . $site . '/';

// Copy files
mkdir($copy_to . '/app', 0777, true);
Expand Down
2 changes: 1 addition & 1 deletion scripts/delete-expired-sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// Modify [SITES_DIR] as needed for testing locally or using on a different server.
// const SITES_DIR = 'C:\Users\Administrator\Documents\Temp\FastSitePHP\Playground\html\sites\\';
const SITES_DIR = '/var/www/html/sites/';
const SITES_DIR = '/var/www/public/sites/';
define('LOG_FILE', SITES_DIR . '../../app_data/delete-sites-last-result.txt');

if (php_sapi_name() === 'cli') {
Expand Down
10 changes: 5 additions & 5 deletions scripts/sync-server-from-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# are confirmed.
#
# To run:
# bash /var/www/scripts/sync-server-from-github.sh
# bash /var/www/fastsitephp-playground/scripts/sync-server-from-github.sh
#
# For testing with [rsync] use [-n = --dry-run]
# Example:
Expand All @@ -22,10 +22,10 @@ rm ~/master.zip
wget https://github.com/fastsitephp/fastsitephp/archive/master.zip -O ~/master.zip
unzip -q ~/master.zip
rm ~/master.zip
rsync -rcv --delete ~/playground-master/app/ /var/www/app
rsync -rcv --delete ~/playground-master/app_data/template/ /var/www/app_data/template
rsync -rcv --delete ~/playground-master/scripts/ /var/www/scripts
rsync -rcv --delete --exclude sites ~/playground-master/html/ /var/www/html
rsync -rcv --delete ~/playground-master/app/ /var/www/fastsitephp-playground/app
rsync -rcv --delete ~/playground-master/app_data/template/ /var/www/fastsitephp-playground/app_data/template
rsync -rcv --delete ~/playground-master/scripts/ /var/www/fastsitephp-playground/scripts
rsync -rcv --delete --exclude sites ~/playground-master/public/ /var/www/fastsitephp-playground/public
rsync -rcv --delete ~/fastsitephp-master/src/ /var/www/vendor/fastsitephp/src
rm -r ~/playground-master
rm -r ~/fastsitephp-master

0 comments on commit 41de7bd

Please sign in to comment.