Skip to content

Commit 50eb392

Browse files
Merge remote-tracking branch 'origin/MAGETWO-52318-deploy-mode-assertion-inconsistent' into develop
2 parents f8a3757 + 335c09c commit 50eb392

File tree

4 files changed

+63
-59
lines changed

4 files changed

+63
-59
lines changed

.htaccess.sample

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
############################################
2-
## overrides deployment configuration mode value
3-
## use command bin/magento deploy:mode:set to switch modes
4-
5-
# SetEnv MAGE_MODE developer
2+
## Optional override of deployment mode. We recommend you use the
3+
## command bin/magento deploy:mode:set to switch modes instead
4+
# SetEnv MAGE_MODE default # or production or developer
65

76
############################################
8-
## uncomment these lines for CGI mode
9-
## make sure to specify the correct cgi php binary file name
7+
## Uncomment these lines for CGI mode.
8+
## Make sure to specify the correct cgi php binary file name
109
## it might be /cgi-bin/php-cgi
1110

1211
# Action php5-cgi /cgi-bin/php5-cgi
@@ -17,42 +16,42 @@
1716

1817
# Options -MultiViews
1918

20-
## you might also need to add this line to php.ini
19+
## You might also need to add this line to php.ini
2120
## cgi.fix_pathinfo = 1
22-
## if it still doesn't work, rename php.ini to php5.ini
21+
## If it still doesn't work, rename php.ini to php5.ini
2322

2423
############################################
25-
## this line is specific for 1and1 hosting
24+
## This line is specific for 1and1 hosting
2625

2726
#AddType x-mapp-php5 .php
2827
#AddHandler x-mapp-php5 .php
2928

3029
############################################
31-
## default index file
30+
## Default index file
3231

3332
DirectoryIndex index.php
3433

3534
<IfModule mod_php5.c>
3635

3736
############################################
38-
## adjust memory limit
37+
## Adjust memory limit
3938

4039
php_value memory_limit 768M
4140
php_value max_execution_time 18000
4241

4342
############################################
44-
## disable automatic session start
43+
## Disable automatic session start
4544
## before autoload was initialized
4645

4746
php_flag session.auto_start off
4847

4948
############################################
50-
## enable resulting html compression
49+
## Enable resulting html compression
5150

5251
#php_flag zlib.output_compression on
5352

5453
###########################################
55-
## disable user agent verification to not break multiple image upload
54+
## Disable user agent verification to not break multiple image upload
5655

5756
php_flag suhosin.session.cryptua off
5857

@@ -61,32 +60,32 @@
6160
<IfModule mod_php7.c>
6261

6362
############################################
64-
## adjust memory limit
63+
## Adjust memory limit
6564

6665
php_value memory_limit 768M
6766
php_value max_execution_time 18000
6867

6968
############################################
70-
## disable automatic session start
69+
## Disable automatic session start
7170
## before autoload was initialized
7271

7372
php_flag session.auto_start off
7473

7574
############################################
76-
## enable resulting html compression
75+
## Enable resulting html compression
7776

7877
#php_flag zlib.output_compression on
7978

8079
###########################################
81-
## disable user agent verification to not break multiple image upload
80+
## Disable user agent verification to not break multiple image upload
8281

8382
php_flag suhosin.session.cryptua off
8483

8584
</IfModule>
8685

8786
<IfModule mod_security.c>
8887
###########################################
89-
## disable POST processing to not break multiple image upload
88+
## Disable POST processing to not break multiple image upload
9089

9190
SecFilterEngine Off
9291
SecFilterScanPOST Off
@@ -95,7 +94,7 @@
9594
<IfModule mod_deflate.c>
9695

9796
############################################
98-
## enable apache served files compression
97+
## Enable apache served files compression
9998
## http://developer.yahoo.com/performance/rules.html#gzip
10099

101100
# Insert filter on all content
@@ -123,14 +122,14 @@
123122
<IfModule mod_ssl.c>
124123

125124
############################################
126-
## make HTTPS env vars available for CGI mode
125+
## Make HTTPS env vars available for CGI mode
127126

128127
SSLOptions StdEnvVars
129128

130129
</IfModule>
131130

132131
############################################
133-
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
132+
## Workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
134133
## Please, set it on virtual host configuration level
135134

136135
## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
@@ -139,19 +138,19 @@
139138
<IfModule mod_rewrite.c>
140139

141140
############################################
142-
## enable rewrites
141+
## Enable rewrites
143142

144143
Options +FollowSymLinks
145144
RewriteEngine on
146145

147146
############################################
148-
## you can put here your magento root folder
147+
## You can put here your magento root folder
149148
## path relative to web root
150149

151150
#RewriteBase /magento/
152151

153152
############################################
154-
## workaround for HTTP authorization
153+
## Workaround for HTTP authorization
155154
## in CGI environment
156155

157156
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
@@ -163,21 +162,21 @@
163162
RewriteRule .* - [L,R=405]
164163

165164
############################################
166-
## redirect for mobile user agents
165+
## Redirect for mobile user agents
167166

168167
#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
169168
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
170169
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
171170

172171
############################################
173-
## never rewrite for existing files, directories and links
172+
## Never rewrite for existing files, directories and links
174173

175174
RewriteCond %{REQUEST_FILENAME} !-f
176175
RewriteCond %{REQUEST_FILENAME} !-d
177176
RewriteCond %{REQUEST_FILENAME} !-l
178177

179178
############################################
180-
## rewrite everything else to index.php
179+
## Rewrite everything else to index.php
181180

182181
RewriteRule .* index.php [L]
183182

app/code/Magento/Deploy/Console/Command/ShowModeCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
6262
]
6363
);
6464
$currentMode = $mode->getMode() ?: State::MODE_DEFAULT;
65-
$output->writeln("Current application mode: $currentMode.");
65+
$output->writeln(
66+
"Current application mode: $currentMode. (Note: Environment variables may override this value.)"
67+
);
6668
} catch (\Exception $e) {
6769
$output->writeln('<error>' . $e->getMessage() . '</error>');
6870
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {

nginx.conf.sample

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Magento Vars
22
# set $MAGE_ROOT /path/to/magento/root;
3-
# set $MAGE_MODE default; # or production or developer
3+
#
4+
# ############################################
5+
## Optional override of deployment mode. We recommend you use the
6+
## command bin/magento deploy:mode:set to switch modes instead
7+
## set $MAGE_MODE default; # or production or developer
48
#
59
# Example configuration:
610
# upstream fastcgi_backend {
@@ -13,7 +17,6 @@
1317
# listen 80;
1418
# server_name mage.dev;
1519
# set $MAGE_ROOT /var/www/magento2;
16-
# set $MAGE_MODE developer;
1720
# include /vagrant/magento2/nginx.conf.sample;
1821
# }
1922

@@ -54,7 +57,7 @@ location ~* ^/update($|/) {
5457
include fastcgi_params;
5558
}
5659

57-
# deny everything but index.php
60+
# Deny everything but index.php
5861
location ~ ^/update/(?!pub/). {
5962
deny all;
6063
}

0 commit comments

Comments
 (0)