Server Configuration - CSCI 3000 Web Programming

Download Report

Transcript Server Configuration - CSCI 3000 Web Programming

Mr. Justin “JET” Turner
CSCI 3000 – Fall 2015
CRN 6710 - Section A – TR 9:30-10:45
CRN 10570 – Section B – TR 5:30-6:45
Configurations
 For a PHP driven site, there are two main types of
configuration we need to consider
 PHP configuration

Primarily done through an ini file
 Server Configuration

This is a little different depending on the type of server
PHP INI File
 If you have access to where PHP is installed on the
server, you will usually find a php.ini file with all of the
settings for PHP that are initialized on startup
 In a shared environment like on GoDaddy, we need to
add an ini file into our site
 GoDaddy only allows us to create a “.user.ini” file,
which has a few limitations on settings
 Basically the settings we put in this file override the
defaults provided by the main php.ini file managed by
GoDaddy
.user.ini
 All of the php.ini settings are listed here:
http://www.php.net/manual/en/ini.list.php
 The .user.ini file is limited to only being able to modify
variables with the Changeable attribute set to
“PHP_INI_PERDIR” or “PHP_INI_ALL”
 I’m going to go through a few of the more common
settings, but if you are looking for something specific,
take a look at the list linked above
 To see the current configuration, use <? phpinfo(); ?>
.user.ini
 arg_separator.input
 open_basedir
 auto_append_file
 post_max_size
 auto_prepend_file
 short_open_tag
 date.timezone
 upload_max_filesize
 display_errors
 max_file_uploads
 error_reporting
 include_path
 max_execution_time
 memory_limit
 Changes in this file can
take 5 minutes
(according to GoDaddy)
Server Configuration
 There are several web server engines available to pick
from
 Some of the more common ones:
 Apache, Internet Information Services(IIS)
 IIS is the windows web server and uses web.config files
to change the server settings
 Apache is one of the most common web servers for
linux, but can also be run on windows, and uses a
series of different configuration files, httpd.conf,
.htaccess, and a few others
Server Settings
 The web.config file is in XML format, making it
relatively easy to modify
 If you have direct server access, there is also a GUI
interface for making configuration changes
 Some settings we have used already this semester are
showing error messages and URL rewriting (with CI)
 Our .NET projects also included a web.config with
some settings describing which .NET library to use and
connection strings for the project
web.config
 Demo GUI Editor
Next Time
 Next time we will start on Web Security
 Reminders:
 Lab 7 (API) is due on Thursday (Nov 12th)
 Term Project is due on Dec 10th