错误:找不到与“ Nginx Full”匹配的配置文件

时间:2019-09-13 12:58:07

标签: nginx

我已经安装了最新版本的nginx。已成功安装。

但是在键入以下命令时出错。

sudo ufw允许“ Nginx Full”

错误:ERROR:找不到与“ Nginx Full”匹配的配置文件

sudo ufw应用程序列表

仅显示

可用的应用程序:

OpenSSH

如何添加应用程序。   Nginx完整   Nginx HTTP   Nginx HTTPS   OpenSSH

我已经安装了两次Nginx服务器

错误:ERROR:找不到与“ Nginx Full”匹配的配置文件

2 个答案:

答案 0 :(得分:6)

Ubuntu(18.04)

您可以通过运行以下命令查看哪些应用可用:

dmjio

端口: HTTP-80 HTTPS-443

将它们添加到UFW的简单方法:

newtype Model = Model
  { _editorOrIde :: EditorOrIde
  } deriving (Show, Eq)

data EditorOrIde =
    Atom
  | VisualStudioCode
  | IntelliJIdeaCommunity
  | SublimeText3
  | Leksah
  deriving (Show, Eq)

makeLenses ''Model

-- | Sum type for application events
data Action
  = NoOp
  | SetChecked EditorOrIde Checked
  | Install
  deriving (Show, Eq)

-- | Entry point for a miso application
main :: IO ()
main = JSaddle.run 8080 $ startApp App {..}
  where
    initialAction = NoOp -- initial action to be executed on application load
    model  = Model Atom           -- initial model
    update = updateModel          -- update function
    view   = viewModel            -- view function
    events = defaultEvents        -- default delegated events
    subs   = []                   -- empty subscription list
    mountPoint = Nothing          -- mount point for application (Nothing defaults to 'body')

-- | Updates model, optionally introduces side effects
updateModel :: Action -> Model -> Effect Action Model
updateModel NoOp m = noEff m
updateModel (SetChecked editorOrIde_ (Checked True)) m = noEff $ m & editorOrIde .~ editorOrIde_
updateModel (SetChecked _ _) m = noEff m
updateModel Install m = m <# do
  liftIO runSetup >> pure NoOp
  where
    runSetup = case _editorOrIde m of
                 Atom -> nixOsAtom
                 _    -> putStrLn "Not implemented yet"

clickHandler :: action -> Attribute action
clickHandler action = onWithOptions (defaultOptions { preventDefault = True }) "click" emptyDecoder $ \() -> action

-- | Constructs a virtual DOM from a model
viewModel :: Model -> View Action
viewModel m = form_ [] [
   link_ [ rel_ "stylesheet", href_ "https://cdn.jsdelivr.net/npm/bulma@0.8.0/css/bulma.min.css" ]
 , h5_ [ class_ "title is-5" ] [ text "Easy Haskell Editor / IDE Setup" ]
 , div_ [ class_ "control" ] [
     "Editor / IDE"
   , br_ []
   , label_ [ class_ "radio" ] [
         input_ [ type_ "radio", name_ "editor", checked_ (_editorOrIde m == Atom), onChecked (SetChecked Atom) ]
       , "Atom"
     ]
   , label_ [ class_ "radio" ] [
         input_ [ type_ "radio", name_ "editor", checked_ (_editorOrIde m == VisualStudioCode), onChecked (SetChecked VisualStudioCode) ]
       , "Visual Studio Code"
     ]
   , label_ [ class_ "radio" ] [
         input_ [ type_ "radio", name_ "editor", checked_ (_editorOrIde m == IntelliJIdeaCommunity), onChecked (SetChecked IntelliJIdeaCommunity), disabled_ True ]
       , "IntelliJ IDEA Community"
     ]
   , label_ [ class_ "radio" ] [
         input_ [ type_ "radio", name_ "editor", checked_ (_editorOrIde m == SublimeText3), onChecked (SetChecked SublimeText3), disabled_ True ]
       , "Sublime Text 3"
     ]
   , label_ [ class_ "radio" ] [
         input_ [ type_ "radio", name_ "editor", checked_ (_editorOrIde m == Leksah), onChecked (SetChecked Leksah), disabled_ True ]
       , "Leksah"
     ]
 ]
 , br_ []
 , button_ [ clickHandler Install , class_ "button" ] [ text "Install" ]
 ]

如果要通过应用程序完成此操作,则需要在/etc/ufw/applications.d中创建应用程序ini文件

示例:

ufw app list

将此文件放入文件

ufw allow 80,443/tcp

然后键入此命令

vi /etc/ufw/applications.d/nginx.ini

答案 1 :(得分:1)

错误:找不到与“ OpenSSH”匹配的配置文件,然后通过给定命令安装第一个ssh

     $data = [];//define empty array.


    $products = Product::where('id','=',$id)->with('reviews.user')->first();


        foreach ($product->reviews as $review){
            $data[]= [$review->user->name];

        }

安装软件包后,添加OpenSSH允许

sudo apt-get install ssh

经过测试