Webplusplus - CIF-Rochester/wiki GitHub Wiki
- IP =
###.###.220.186 - Purpose = Development web server
- Kerberized logins = Yes
- AFS client = Yes
- Model = Apple Xserve G5
- Memory = 1GB
- OS = Debian 7.4
- Architecture = ppc64
Webplusplus was CIF's development web server running on comparable hardware to While the Webmaster Duties do not require development of Webplusplus, they may still want to work on it.
It appears that Webplusplus was decommissioned when Web1 was migrated from an Apple Xserve G5 to that !@#$ Dell PowerEdge 2850 (and its stupid RAID controller!), though we don't know that for sure. Either way, it no longer exists.
All developer accounts should be members of the www-data group in order to modify files in /var/www/ without sudo permissions. They should also be in the sudo group if they need sudo permissions. Give the permissions with the following: adduser USER_NAME www-data and adduser USER_NAME sudo
All developers should ensure that their Git commits will reflect their name and email address. Otherwise commits will not be attributed properly in the Git logs and on GitHub. The --global flag tells it to write to ~/.gitconfig instead of looking for a config file in the local repository.
git config --global user.email "[email protected]" git config --global user.name "Full Name"
When work is completed on Webplusplus, it should be tested in Internet Explorer 7+, Firefox, Chrome, Safari, and possibly Opera on OS X and Windows (where applicable) to ensure that the changes are functional cross-browser. Once this has been confirmed, changes should be merged to the develop branch (if working on a branch for the changes to be made, like a responsible person) and then merged into master and pushed to the repository. Be sure to switch back to the develop branch after pushing master!
git checkout master git merge develop git push origin master git checkout develop
Changes will then need to be pulled onto This can be done by running git pull origin master on Web1 from the /var/www/ directory.
Swapping Webplusplus to be our production server should be done sparingly and only when web1 needs to go down for significant maintenance or experiences hardware issues. If swapping Webplusplus to production is necessary, follow these steps:
- Copy the wp-content/uploads/ directory from where WordPress is located on web1 to the equivalent directory on Webplusplus.
- Ensure that wp-content/plugins/ has the same plugins that are present in that directory on web1.
-
wp-content/themes/cif/theme-config.php: Change the values of THEME_DEBUG and USE_DEBUG_CONSTANTS to be
false. - panel/panel-config.php: Change the value of PANEL_URL to use the cif.rochester.edu domain instead of the webplusplus subdomain.
- /etc/apache2/sites-available/default: Change the values of ServerName and the Redirect line to use the cif.rochester.edu domain instead of the webplusplus subdomain.
- /etc/apache2/sites-available/default-ssl: Change the value of ServerName to use the cif.rochester.edu domain instead of the webplusplus subdomain.
- /etc/apache2/sites-available/panel: Change all WebAuthReturnURL lines to use the cif.rochester.edu domain instead of the webplusplus subdomain.
- Import the WordPress database from [[On [web1], run
mysqldump -u wordpress -p wordpress > wordpress.sqlto dump the database as the wordpress MySQL user. Then move this file to Webplusplus and runmysql -u root -p wordpress < wordpress.sqlto import it as the root MySQL user. The database dump should then be deleted. - Restart Apache on Webplusplus with
service apache2 restart. - Give Webplusplus an IP address in the lower half for the time being so that it is visible off campus. Edit /etc/network/interfaces to have Webplusplus pull its new IP address. Finally, update the DNS records in Labmaster to make www alias to Webplusplus and to change the non-web1 entry with web1's IP address (the entry with cif.rochester.edu as its FQDN) to point to Webplusplus.
- Restart the machine to restart the network interface with
reboot.
To switch Webplusplus back to development, revert the changes made in the above steps. Webplusplus's original IP address was ###.###.220.186
After swapping to or from production, some things in WordPress may need to be updated.
- If the events calendar is not updating correctly, go to Settings → Google Calendar Events and click Refresh on the CIF Events feed. This will reset the events cache.
Webplusplus was set up with a database dump from Web1. To have WordPress use links to webplusplus.cif.rochester.edu instead of cif.rochester.edu, the database records will need to be updated. Log into the MySQL console with mysql -u wordpress -p wordpress and run the following:
UPDATE cifpipes_options SET option_value=replace(option_value, 'https://cif.rochester.edu', 'https://webplusplus.cif.rochester.edu') WHERE option_name='home' OR option_name='siteurl'; UPDATE cifpipes_posts SET guid=replace(guid, 'https://cif.rochester.edu','https://webplusplus.cif.rochester.edu'); UPDATE cifpipes_posts SET post_content=replace(post_content, 'https://cif.rochester.edu', 'https://webplusplus.cif.rochester.edu'); UPDATE cifpipes_postmeta SET meta_value=replace(meta_value, 'https://cif.rochester.edu','https://webplusplus.cif.rochester.edu');
Webplusplus should be set up following the same steps as Web1#Setup, with the exception of these considerations:
- Web Server Setup
- Default VirtualHost
- The ServerName line should be
ServerName webplusplus.cif.rochester.edu - The Redirect line should be
Redirect permanent / https://webplusplus.cif.rochester.edu/
- The ServerName line should be
- SSL VirtualHost
- The ServerName line should be
ServerName webplusplus.cif.rochester.edu
- The ServerName line should be
- Panel VirtualHost
- The WebAuthReturnURL line under
<Location /panel/logout.php>should beWebAuthReturnURL https://webplusplus.cif.rochester.edu/panel - The WebAuthReturnURL line under
<Location /panel/adduser.php>should beWebAuthReturnURL https://webplusplus.cif.rochester.edu/panel/adduser.php
- The WebAuthReturnURL line under
- Default VirtualHost
On Webplusplus, the develop branch of the GitHub repo should be used for development. Switch to the develop branch and pull it.
git checkout -b develop git pull origin developSASS and Compass will be necessary for compiling the stylesheets. Install them with
sudo apt-get install ruby-sass ruby-compass