Installing Environment

Seme Framework has been tested on production web server such as Apache, litespeed, and the nginx. But in development mode, Seme Framework only tested on XAMPP environment. So, if problem occured, you can open issue on Seme Framework Github page.

Apache Environment

In Apache production environment, you have to override some code such as app/config/config.php and .htaccess file if a problem occured. Almost in all Apache production, the value of $sene_method in app/config/config.php value is REQUEST_URI.

Sub Directory Apache Environment

Seme Framework mostly running well in root directory or subdirectory. But in some cases, you need to define rewrite_base in .htaccess file. Here is the example if seme framework put on foo directory.

RewriteEngine on
RewriteBase /foo
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 
					

Nginx Environment

Seme Framework running well on Nginx environment too. Here is some configuration if you need it. You can get all of code or partially. The below Nginx configuration obtained from working Seme Framework in Centos 7.

 server {
listen 80;
#listen 443 ssl;
server_name example.com www.example.com;

root /home/ec2-user/sites/example.com/;
#ssl_certificate /etc/nginx/ssl/example.crt;
#ssl_certificate_key /etc/nginx/ssl/example.key;

index index.php; #this is important
location / {
  #autoindex on;
	try_files $uri $uri/ /index.php?args; #this is uri routing like in apache rewrite
}
location ~ .php$ {
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php7-fpm.sock;
fastcgi_index index.php; #this is important too
fastcgi_param ENVIRONMENT production;
}
					}
					

XAMPP Environment

In XAMPP environment, Seme framework are running well to, but we have different code in app/config/config.php and .htaccess file. The value of $sene_method in app/config/config.php value is PATH_INFO. And then if you using seme framework on subdirectory you can eliminate RewriteBase on .htaccess.

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
					

Thats it.