0

Setup

Ubuntu 14.04 Server

Apache 2.4

I have multiple domains under this server and all of them were working correctly at one point. I attempted to access 3 of the domains and all ran into issues. I found old .htaccess files in the directories and once they were deleted/fixed, 2 of the 3 sites were back up and running without issue. The last site is the issue. I am always getting 404 errors on it.

It seems Apache is always adding my domain name to the path. If I have the domain pointed to the root www directory, it says

"The requested URL /sub.domainname.com/index.php was not found on this server."

If I point the domain name to a different directory, the error will come back with

"The requested URL /sub.domainname.com/directory/sub.domainname.com/index.php was not found on this server."

<VirtlHost *:80>

    ServerAdmin admin@email.com
    Servername sub.domainname.com
    ServerAlias www.sub.domainname.com
    DocumentRoot /var/www/html/username/sub.domainname.com

    ErrorLog ${APACHE_LOG_DIR}/ehi_error.log
    CustomLog ${APACHE_LOG_DIR}/ehi_access.log combined

</VirtualHost>

I have gone through and gone through and used a2dissite to remove the domain. I have deleted and recreated the conf file. Yes I have .conf on all the files. I have reloaded the apache server many times. I have rebooted the machine many times.

I have removed all the other sites from the server, used a2dissite for them and moved the conf files. All them are behaving normally and resolve without issues.

When I have the all the other domains disabled they will go to the root for the web server (/var/www/html) and display a test index.html without issues but this domain will not.

the only error I have in the log file, since I set this log file to its own, this

"[Fri Sep 05 01:40:32.733484 2014] [core:alert] [pid 31468] [client 23.28.XX.XXX:50531] /var/www/html/username/directory/sub.domainname.com/.htaccess: Invalid command 'ddType', perhaps misspelled or defined by a module not included in the server configuration"

I have no .htaccess in the directory now. I have no .htaccess files in the path either.

And on the whim, I have set this directory and all of its files to 777 for testing purposes on the idea of a permission issue with no changes.

0

'ddTpe' is a misspelling of 'AddType'. check your .htaccess file (of the sub-domain) first for this error.

Also check your httpd conf files for 'ddType' and change it to 'AddType'.

in httpd.conf - see what other conf files it includes so you can track this error down in one of the conf files.

when you've checked all and made changes, restart httpd and see if the problem is solved.

0

You misspelled VirtualHost as VirtlHost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.