Answer the question
In order to leave comments, you need to log in
How to make Angular and Laravel friends?
Hello. When setting up the server, there was a problem of choosing which of the 2 files (index.php and index.html) j to access. The point is that index.php(laravel) connects to the database, and index.html(angular) connects to the project itself. How do I set them up to work together.
NGNIX config.
server {
listen 80;
server_name candy-cases.com www.candy-cases.com;
access_log /var/log/access.log;
error_log /var/log/error.log;
rewrite_log on;
root /var/www/candy-cases.com/public;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
#expires -1;
#add_header Pragma "no-cache";
#add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
#try_files $uri $uri/ /index.html ;
}
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
location ~* \.php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
expires 365d;
}
error_page 405 =200 $uri;
}
<IfModule mod_rewrite.c>
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html
# to allow html5 state links
RewriteRule ^ index.html [L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Try full config for mail:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:tls => true,
address: 'smtp.yandex.ru',
port: '465',
domain: 'ВАШ_ДОМЕН.ru',
authentication: :plain,
user_name: 'ЮЗЕР@ВАШ_ДОМЕН.ru',
password: 'ПАРОЛЬ'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question