Below we have provided a general overview of the steps required to run CSWeb on an Apache server. In this example, it is assumed WampServer has been installed and configured. WampServer is only meant for a development environment. WampServer's configurations for Apache, MySQL, and PHP will be optimized for development and not performance or security. In a production environment WampServer (or XAMPP) should not be used. Instead, Apache, MySQL, and PHP should be installed individually. On Linux this is referred to as the LAMP stack and on Windows as the WAMP stack.
Copy the root directory of your CSWeb project to <Drive>:\wamp64\www. The result may look like C:\wamp64\www\csweb. Note that with Apache, the case of the folder name matters. CSWeb and csweb will require different URLs to access the server. For simplicity, we recommend using all lowercase e.g. csweb.
Make sure Apache and MySQL are running.
Add a new database to use for CSWeb using the MySQL command line, MySQL workbench, or phpMyAdmin. Create a user with access to the new database. For security reasons the database user should have a corresponding password.
Open a browser and in our case navigate to
localhost/csweb/setup. The setup script will first check to make sure your server meets the prerequisites. If your server does not pass, refer to the
Minimum Server Requirements. Update your server and run the script again. If your server passed the script will ask for the last few configuration details.
- Database name: the name of the database you created earlier.
- Hostname: this will typically be localhost.
- Database username: by default this will be root.
- Database password: by default this may be blank. Do not use the default password for a live server.
- CSWeb admin password: create a password to pair with the default user admin to log into CSWeb.
Now verify the final two fields.
- Path to files directory: for this setup, C:\wamp64\www\csweb\files
- CSWeb API URL: for this setup, http://localhost/csweb/api
If everything is correct you will hit next and receive the "Setup Complete!" message. From here log in using admin as the username and the CSWeb admin password you just created. Once you have run the setup script you will not be able to run it again unless you delete src\AppBundle\config.php.