nginx 位置正则表达式 set_string_value

我该如何做这样的事情(在模块变量中写入部分位置):

nginx.conf: ...

System.InvalidOperationException: A relational store has been configured without specifying either the DbConnection or connection string to use.
   at Pomelo.EntityFrameworkCore.MySql.Internal.MySqlOptions.getconnectionSettings(MySqlOptionsExtension relationalOptions)
   at Pomelo.EntityFrameworkCore.MySql.Internal.MySqlOptions.Initialize(IDbContextOptions options)
   at microsoft.EntityFrameworkCore.Internal.SingletonOptionsInitializer.EnsureInitialized(IServiceProvider serviceProvider,IDbContextOptions options)
   at microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>g__BuildServiceProvider|3()
   at microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>b__2(Int64 k)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key,Func`2 valueFactory)
   at microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options,Boolean providerRequired)
   at microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at microsoft.EntityFrameworkCore.DbContext.microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.get_Instance()
   at microsoft.EntityFrameworkCore.Infrastructure.Internal.InfrastructureExtensions.GetService[TService](IInfrastructure`1 accessor)
   at microsoft.EntityFrameworkCore.Infrastructure.accessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(Func`1 factory)
   at microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
   at microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name,String outputDir,String contextType,String namespace)
   at microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name,String namespace)
   at microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.<>c__DisplayClass0_0.<.ctor>b__0()
   at microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(action action)
A relational store has been configured without specifying either the DbConnection or connection string to use.

...

当我想在日志中输出自写nginx模块中的变量时,我得到

module_string = $1

但期望 uri /img/one/two/

module_string = 一/二

haximu 回答:nginx 位置正则表达式 set_string_value

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/67.html

大家都在问