Gettin UB Data Migration to work with Valet Plus

Hi,
For local development we’re using Valet Plus and we would like to have the UB Data Migration Pro module to work on our development environment. Information about Valet Plus can be found here: https://github.com/weprovide/valet-plus
I have added the UB tool nginx configuration to the Valet configuration and the index.php file is working. However the static assets (JS, CSS, etc) are not working. How do I need to configure my Nginx in order to have the static assets show up with Valet Plus as well? 

server {
listen 80;
listen 443 ssl http2;
server_name dollskill.dev.cream.nl www.dollskill.dev.cream.nl *.dollskill.dev.cream.nl;

root /;
charset utf-8;
client_max_body_size 128M;

location /41c270e4-5535-4daa-b23e-c269744c2f45/ {
internal;
alias /;
try_files $uri $uri/;
}

ssl_certificate /Users/dverkade/.valet/Certificates/dollskill.dev.cream.nl.crt;
ssl_certificate_key /Users/dverkade/.valet/Certificates/dollskill.dev.cream.nl.key;

location / {
rewrite ^ /Users/dverkade/.composer/vendor/weprovide/valet-plus/server.php last;
}

access_log /Users/dverkade/.valet/Log/nginx-access.log;
error_log /Users/dverkade/.valet/Log/nginx-error.log;

error_page 404 /Users/dverkade/.composer/vendor/weprovide/valet-plus/server.php;

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_read_timeout 3600;
fastcgi_pass unix:/Users/dverkade/.valet/valet.sock;
fastcgi_index /Users/dverkade/.composer/vendor/weprovide/valet-plus/server.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /Users/dverkade/.composer/vendor/weprovide/valet-plus/server.php;
fastcgi_param SERVER_NAME $host;
}

location ~ /\.ht {
deny all;
}


#START FOR ub-tool APP CONFIG
location /ub-tool/ {
index index.html index.php;
try_files $uri $uri/ /index.php?$args;

location ~ ^/(protected|framework|themes/\w+/views) {
deny all;
}

#avoid processing of calls to unexisting static files
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(.*)$;

#let application catch the calls to unexising PHP files
set $fsn /ub-tool/index.php;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}

fastcgi_pass unix:/Users/dverkade/.valet/valet.sock;
#fastcgi_pass fastcgi_backend
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /Users/dverkade/Development/dollskill/pub/ub-tool/index.php;

#PATH_INFO and PATH_TRANSLATED can be omitted, but RFC 3875 specifies them for CGI
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED /Users/dverkade/Development/dollskill/pub/ub-tool/index.php;
}

# prevent nginx from serving dotfiles (.htaccess, .svn, .git, etc.)
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
}
#END FOR ub-tool CONFIG
}

 
 

1 answer

Profile photo of Mall Staff 184060.00 $tone December 24, 2019
Public

Hi Danny,

With your case, in the configuration lines for our module, please try to change the line:

location /ub-tool/ {

with:

location /pub/ub-tool/ {

Once done, restart the Nginx server and let me know how it goes.

Regards,
Mall.

#1

Please login or Register to Submit Answer

Written By

Comments