# Use the front controller as index file. It serves as a fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex index.php
# By default, Apache does not evaluate symbolic links if you did not enable this
# feature in your server configuration. Uncomment the following line if you
# install assets as symlinks or if you experience problems related to symlinks
# when compiling LESS/Sass/CoffeScript assets.
# Options +FollowSymlinks
# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve
# to the front controller "/index.php" but be rewritten to "/index.php/index".
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the index.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
# Sets the HTTP_AUTHORIZATION header removed by Apache
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
# Redirect to URI without front controller to prevent duplicate content
# (with and without `/index.php`). Only do this redirect on the initial
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an
# endless redirect loop (request -> rewrite to front controller ->
# redirect -> request -> ...).
# So in case you get a "too many redirects" error or you always get redirected
# to the start page because your Apache does not expose the REDIRECT_STATUS
# environment variable, you have 2 choices:
# - disable this feature by commenting the following 2 lines or
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
# following RewriteCond (best solution)
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
# Rewrite all other queries to the front controller.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
Redirect 301 /catalog/utu https://crm.ru/utu
# RewriteEngine On
# RewriteCond %{HTTPS} off
# RewriteCond %{HTTP:X-Forwarded-Proto} !https
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
# When mod_rewrite is not available, we instruct a temporary redirect of
# the start page to the front controller explicitly so that the website
# and the generated links can still be used.
RedirectMatch 307 ^/$ /index.php/
# RedirectTemp cannot be used instead
</IfModule>
</IfModule>
<VirtualHost 127.0.0.1:8080>
ServerName crm.ru
ServerAlias www.crm.ru
ServerAdmin we@gmail.com
DocumentRoot /var/www/crm/public_html/public
DirectoryIndex index.php
<Directory /var/www/crm/public_html/public>
AllowOverride None
Order Allow,Deny
Allow from All
FallbackResource /index.php
</Directory>
<Directory /var/www/crm/public_html/public/bundles>
DirectoryIndex disabled
FallbackResource disabled
</Directory>
ErrorLog /var/www/crm/error.log
CustomLog /var/www/crm/access.log combined
</VirtualHost>
server {
listen 80;
server_name crm.ru www.crm.ru;
return 301 https://$host$request_uri;
}
server {
listen 443;
listen [::]:443 ssl;
root /var/www/crm/public_html/public;
server_name crm.ru www.crm.ru;
ssl_protocols TLSv1.2;
ssl on;
ssl_certificate /etc/nginx/ssl/crm.ru.crt;
ssl_certificate_key /etc/nginx/ssl/crm.ru.key;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Mixed Content: The page at 'https://crm.ru/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://crm.ru/admin/login'. This request has been blocked; the content must be served over HTTPS.
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 32262/nginx: master
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 32019/apache2
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 32262/nginx: master
tcp6 0 0 :::80 :::* LISTEN 32262/nginx: master
tcp6 0 0 :::443 :::* LISTEN 32262/nginx: master
<VirtualHost 127.0.0.1:8080>
ServerName crm.ru
ServerAlias www.crm.ru
ServerAdmin we@gmail.com
DocumentRoot /var/www/crm/public_html
DirectoryIndex /index.php
<Directory /var/www/crm/public_html>
AllowOverride None
# Require all granted
Order Allow,Deny
Allow from all
FallbackResource /index.php
</Directory>
<Directory /var/www/project/public/bundles>
DirectoryIndex disabled
FallbackResource disabled
</Directory>
ErrorLog /var/www/crm/error.log
CustomLog /var/www/crm/access.log combined
</VirtualHost>
server {
listen 80;
server_name crm.ru www.crm.ru;
return 301 http://www.$host$request_uri;
}
server {
listen 443;
listen [::]:443 ssl;
root /var/www/crm/public_html;
server_name crm.ru www.crm.ru;
ssl_protocols TLSv1.2;
ssl on;
ssl_certificate /etc/nginx/ssl/crm.ru.crt;
ssl_certificate_key /etc/nginx/ssl/crm.ru.key;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
data
App\Entity\Positions {#1299 ▼
-id: null
-quantity: 29
-dateUpdated: DateTime @1671037060 {#1313 ▶}
-session: Proxies\__CG__\App\Entity\Sessions {#1434 …}
-Order: null
-Product: Proxies\__CG__\App\Entity\Products {#1474 …}
}
id
"22"
previous_data
App\Entity\Positions{#48 ▼
-id: 22
-quantity: 29
-dateUpdated: DateTime @1671037060 {#1313 ▶}
-session: Proxies\__CG__\App\Entity\Sessions {#1434 …}
-Order: null
-Product: Proxies\__CG__\App\Entity\Products {#1474 …}
}
import { createApp } from 'vue';
import App from './App';
import store from './store'
const popup =createApp(App).use(store).mount('#modal');
window.popup = {};
window.popup.showModal =
(banner) =>popup.$store.dispatch('modal/showModal',"data");
const show=createApp(App).use(store).use(VueNumberFormat, {prefix: '', suffix: window.staticStore.currency , decimal: '.', thousand: ' ', precision: 1});
,import { createApp } from 'vue';
import App from './App';
import store from "./store";
import VueNumberFormat from 'vue-number-format'
const show=createApp(App);
show.use(store);
show.use(VueNumberFormat, {prefix: '', suffix: window.staticStore.currency , decimal: '.', thousand: ' ', precision: 1});
show.mount('#app');
Если у вас правильно описаны сущности, доктрина не тянет все сущности за раз, а только тогда, когда идёт обращение.
Чтобы "твиг" не делал миллион запросов к бд, пишут ручные запросы, без использования доктрины.
По коду, я могу предположить, что вы можете делать 2440 встакок кода, вместо одной большой.
А если у вас это вставляется всё же одним запросом, то возможно стоит разбить это допустим пачками по 100-200 строк.
В общем не понятно как у вас реализовано.
public function setCreate($entityMS)
{
$this->entityManager->persist($entityMS);
$this->entityManager->flush();
}
public function setSave()
{
$this->entityManager->flush();
}
когда идёт обращение
я даже отключила весь .htaccess ничего не помогает,
выполнила команду
nginx -t
Были предупреждения:
они исчезли.
по пути /etc/nginx/sites-available были лишние конфиги crm.conf.save, crm.conf.save1 (хостинг устанавливал платный сертификат, видимо не доделал, а доделывать не хочет). Я их поудалаляла.
Теперь в папке /etc/nginx/sites-available 3 файла :
1)crm
nano /var/log/nginx/crm_error.log
-пустой2)crm.conf
как подправила, предупреждения исчезли, но мне не помогло, перенаправления нет
и ошибка в консоли
3)default (вообще никакой роли не играет, как мне кажется)
грешила на кеш сервера, перезагрузила, не помогло.