HowTo for setting up an Website? (Nginx)

  • Hey,


    I need some help to setting up an simple Website that supports PHP.
    (The page will only be used in LAN, no need to connect from the Internet).


    I'm using OMV 1.0 and Nginx-Plugin is installed.


    Then there are the first problems.


    - How to setup the Server and Pools correctly?
    - What are the recommended settings for the PHP-Pool?
    - How can I check that PHP is working?
    - Is it possible to setup an Alias for this Page?


    I'm so far that the index.html is reachable but it seems that PHP isn't working properly.


    Then, if I want to confirm the setup from "Server" or "Settings" (under NGinx Plugin) I'm getting an Error-Message from OMV but it helps exactly nothing.
    The Error says: "An Error occured". (I'm German, so the Message says: "Es trat ein Fehler auf".)
    In Syslog I'm not able to find something about this Error.
    The Error comes everytime but only when I'm changing something under "Server" or "Settings". "Pools" can be edited without an Error.


    Thanks for help!

    • Offizieller Beitrag

    Read this thread. I describe exactly how to setup wordpress with the nginx plugin. So, it should help you as well.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thank you VERY much.
    It seems to help, at least I think PHP is working now. The "index.php" checkmark does the trick. I hadn't checked it because there is no index.php, the index is an html file, but there are other files with php.


    But, the Error-Message "An Error occured" is still there! Am I the only one with this Error??

    • Offizieller Beitrag

    Can you take a screenshot of it? If it is the Error occurred message that I am thinking of, it isn't a problem.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    That error is a general communication error with the web interface. It is probably not even related to the plugin and shouldn't cause any problems.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Okay, thank you very much for your help!


    Do you know something about the possibility of an alias?
    Now the Adress is 192.168.1.109:8888, would be nice to have 192.168.1.109/C0mmanda for example.


    Is that possible?

    • Offizieller Beitrag

    Not sure if you can put the following lines in extra options:


    Code
    location /c0mmanda {
            proxy_pass        http://localhost:8888/;
            proxy_set_header  Host localhost:8888;
            proxy_redirect    default;
    }

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Not sure if you can put the following lines in extra options:


    Code
    location /c0mmanda {
            proxy_pass        http://localhost:8888/;
            proxy_set_header  Host localhost:8888;
            proxy_redirect    default;
    }


    Unfortunately that doesn't work.
    Page cannot be displayed. (If I type 192.168.1.109/c0mmanda in my adressbar)



    That would be awesome! Thought it's to weird to ask for that ;)
    Can you explain the point with the second DNS entry? Don't get what you mean yet... :(

  • Hi,


    Zitat

    Can you explain the point with the second DNS entry? Don't get what you mean yet...


    thats easy.


    In my example OMV listens to "Castor.lan" on 10.3.3.4.
    Owncloud listens also on 10.3.3.4 on the name "owncloud.lan".
    This name has to be added to your DNS-server, normally your router, so that this name also points to 10.3.3.4.

    • Offizieller Beitrag

    I don't use the nginx plugin but I use another config in sites enabled dir because the plugin doesn't allow the listen ::[:80] directive which is good for proxy pass using port 80 with a host. Take a look at the guide section. The only problem with this is like they pointed before you need to be in control of your local DNS resolver (router) or add entries in each client host files.

  • Okay, now I get it.
    Too bad that my Router does not support such Personal DNS-Entrys.


    Think I have to setup an own DNS-Server to realize that.
    OMV should support an DNS-Server as far as I know.


    Thank you very much!

    • Offizieller Beitrag

    There is a dnsmasq plugin for OMV. It is beta but works.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I have already an Dualband Gigabit Router. (TP-Link TL-WDR4300). It's fully supported by OpenWRT as far as I know but till now there was no need for me to flash a Custom-Firmware.
    And for a simple Website, which is only used in my LAN it's a little bit too much I think.


    So the only solution is an alias for me at the moment.


    Thank you very much for your help and support!

  • sorry guys, this is a old therd, but i think it is the right place for the question:
    what is the effect from the default server option?


    I test it but i have no difference ?(

    omv 6.x | 64 bit | omvextrasorg 6.x |
    used plugins: omv-extras | portainer | rsnapshot | antivirus
    used container: portainer/portainer | nextcloud/all-in-one | linuxserver/swag | paperless-ngx | jellyfin/jellyfin | lmscommunity/logitechmediaserver | adguard/adguardhome |

    • Offizieller Beitrag

    Default server is what the server sends the user to if they specify a domain that isn't explicitly defined as a virtualhost/website.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!