Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 13th February 2015
scrummie02 scrummie02 is offline
Port Guard
Join Date: Nov 2011
Posts: 27
Default FreeBSD NGINX issue

So I have NGINX installed from the ports and it works well. I've recently installed WP and want to run multi-site.

The issue is the sub domain stuff. So when I go to http://domainname...I'm good.
http://sub.domainname.com no access. I've configured NGINX hundreds of times before so I must be missing something. Here is my server blocks

server {
    listen 80;

    server_name  domain.com *.domain.com;
    root        /opt/wordpress;
    index       index.php index.html index.htm;

    access_log /var/log/nginx/domain.access_log;
    error_log /var/log/nginx/domain.error_log;

    # Security
    include global/security.conf;
    #ModSecurityEnabled on;
    #ModSecurityConfig /usr/local/etc/modsecurity/modsecurity.conf;

    location / {
        # This is cool because no php is touched for static content.
        # include the "?$args" part so non-default permalinks doesn't break when using query string
        try_files $uri $uri/ /index.php?$args;

        # PHP-FPM
        include global/php-fpm.conf;

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
user www;

# Set this value to 1 or N with N = N-Core
worker_processes  2;
worker_rlimit_nofile 4096;
events {
        # max_clients = worker_processes * worker_connections
        worker_connections  1024;
        # Only for Linux 2.6 or >
        use kqueue;
        # Accept as many connections as possible
        multi_accept on;

http {
        # Mime types
        include         mime.types;
        default_type    application/octet-stream;

        # Log format
        real_ip_header          X-Forwarded-For;
        log_format      main '$remote_addr - $remote_user [$time_local]  $status '
                '"$request" $body_bytes_sent "$http_referer" '
                '"$http_user_agent" "$http_x_forwarded_for"';

        # Hide the Nginx version number
        server_tokens off;

        # Some tweeks...
        sendfile                        on;
        tcp_nodelay                     on;
        #tcp_nopush                     on;

        # Timeouts
        #keepalive_timeout              10 10;
        keepalive_timeout               65;
        client_body_timeout             30;
        client_header_timeout           30;
        send_timeout                    30;
        client_max_body_size            8M;
        reset_timedout_connection       on;

        # Gzip module configuration
        gzip                    on;
        gzip_disable            "MSIE [1-6].(?!.*SV1)";
        gzip_vary               on;
        gzip_comp_level         3;
        gzip_proxied            any;
        gzip_buffers            16 8k;

        include /usr/local/etc/nginx/site-configuration/*;
What am I missing that's preventing the subdomains from being reachable. I tend to have domain mapping installed as well but I need to get this working first.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NGINX/PHP-FPM wordpress issue scrummie02 OpenBSD General 5 23rd December 2012 08:41 AM
vsftpd port issue on FreeBSD 8.2 x64 sparky FreeBSD Ports and Packages 7 29th March 2012 11:50 AM
FreeBSD ping issue wooki FreeBSD General 1 2nd October 2009 04:10 PM
Directadmin on FreeBSD 7 Stable i386 issue Celestemmcknight FreeBSD Ports and Packages 1 7th June 2009 11:35 PM
Installation Issue : FreeBSD 7.0-RELEASE on Dell D630 zelut FreeBSD Installation and Upgrading 4 3rd October 2008 12:44 PM

All times are GMT. The time now is 06:58 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick