• Ok, let me sketch the situation:
    My server is ran by a friend. It’s a basic set-up with DirectAdmin as a user panel. I really wanted to do a subdomain install, which initially wasn’t possible with the contract I had, but he’s been so friendly as to allow me some extra freedom on the server. This means that I could access the DNS Management necessary for running a subdomain wordpress installation.

    He also set the httpd.conf file (ServerAlias *.mysite.com) for me, but warned me that he would have to set this to readonly, which would mean I wouldn’t be able to make any more changes to the settings via my DirectAdmin panel. I agreed to this thinking that it wouldn’t be a problem and did all the work to get a WordPress network up and running. WordPress ran it’s installer (in subdomain “mode”) without problems and I could finally create the two subdomains I wanted.

    Here’s where the trouble began. Both subdomains showed me the text: “apache is running normally”. No matter what I tried, nothing helped. I started fiddling around with my DirectAdmin panel to try and fix this, but unfortunately couldn’t. I tried a couple of things and more than once got the message: “Unable to write user’s httpd.conf” – logical, I know.

    My friend said he would reset everything (again :s) and would add everything I wanted to the httpd.conf file, but he would obviously have to set it to readonly again after he was done. My question now is, HOW can I make this work. I have the feeling that I was so close, but have no idea how to continue. Does wordpress write any additional data to the httpd.conf file when I create the subdomains? Is it enough to have httpd.conf writable during the installation of these subdomains, or can I do it manually after running the installer (to not have my friend on stand-by all the time)?

    Will it EVER work for me given my set-up? All and any help would be greatly appreciated. I’m happy to answer any additional questions too!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Both subdomains showed me the text: “apache is running normally”.

    Did he point the wildcard subdomains to the public_html folder? Basically you want them ALL to point to your master domain where WP is installed.

    Does wordpress write any additional data to the httpd.conf file when I create the subdomains?

    No, it does not write to httpd.conf.

    Thread Starter ewergreen

    (@ewergreen)

    Ipstenu, thank you very much for your reply. The only thing I can reply to that is: I’m not sure.

    He read the WP Network install documentation and added the following to the DNS management in DirectAdmin:
    Name: *.ewergreen.be.
    Type: A
    Value: 123.123.example.IP

    He also added the following to httpd.conf:
    ServerAlias *.ewergreen.be

    After that, I was on my own. I did not point the subdomains anywhere, but I do seem to remember that wordpress made some changes to the DNS management (might be mistaken here).

    So did I forget to do something and is that why it wasn’t working? If so please point me somewhere that explains what I forgot. I’m already very happy to find out that I don’t need to have the httpd.conf file to always be writeable. So this far I can hopefully still achieve a subdomain wp install.

    He also set the httpd.conf file (ServerAlias *.mysite.com) for me,

    That has to be set on the SAME FOLDER where your wordpress install is. the fact you’re getting an apache message means it isn’t.

    And you need to add DNS records as well.

    Wildcard subdomains are a server.. thing. Not specific to WordPress. If you’re hosting buddy doesn’t know how to set them up, then I dunno what to tell ya. Use subfolders?

    Thread Starter ewergreen

    (@ewergreen)

    Thank you for the info Andrea_r.
    Ok, so I’ll need to make sure that the httpd.conf file is inside the domains folder on Directadmin. I actually think it was in there before, but it could’ve been higher up in the structure.

    I WILL get this working, so if that’s what it takes, I’ll find out how to do it myself. On the wordpress “create a network” page it says:

    In the DNS records on your server, add a wildcard subdomain that points to the main installation. It should look like:
    A *.example.com

    Is the above not enough to get it working? Your above comment kind of got me confused about this.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Two different things. Both the server AND your DNS have to know how to handle it.

    Most DNS entries have the A name already in so you don’t have to dink with them (at least I’ve found so in my experience, depends on your DNS server actually…)

    As for the httpd.conf, you don’t want to MOVE the file, you have to CORRECT the … call. It’s not the right word, I’m blanking.

    Ask your host guy what the WHOLE server alias call is for the wildcard?

    Should be something like this:

    <VirtualHost *>
            ServerName  www.example.com
    	ServerAlias *.example.com
    
            DirectoryIndex index.html
            DocumentRoot /home/www/www.example.com/htdocs
    
    	....
    </VirtualHost>

    Actually this line

    <VirtualHost *>

    doesn’t have to have a wildcard for it to work. that makes it a wildcard *host*, not a wildcard subdomain. that means any domain tossed at the install will hit that doc root.

    And yes eweregreen, like ipstenu reiterated – you need a wildcard subdomain record in the virtual host directive for your web account (whever the file may be – it depends on the OS, so NO don’t move it) and you ALSO need the wildcard record in the DNS.

    Thread Starter ewergreen

    (@ewergreen)

    Ipstenu, just got an extract of my virtualhost thing from my friend.

    ServerName www.myname.be
            ServerAlias *.myname.be
            ServerAdmin webmaster@myname.be
            DocumentRoot /home/myfirstname/domains/myname.be/public_html

    Looks OK to me at first sight, but I’m hardly an expert.

    So it seems that everything was set correctly and it wasn’t working. He’s completely reset the damn thing for me again, so I’ll try to install it for a 4th time;

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP Network (Subdom) Install on DirectAdmin: httpd.conf issues (limited rights)’ is closed to new replies.