Error 404 squirrelmail-1.4.22 - php

I am new to squirrelmail. I am trying to configure a mail server on a linux machine which I installed apache, php, and dovecot.
I installed squirrelmail from the source code in /var/www/webmail/
I configured a virtual host:
<VirtualHost *:80>
ServerName webmail.my.domain.com
ServerAlias webmail
DocumentRoot /var/www/webmail
<Directory "/var/www/webmail">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I set the Domain under "Server Settings" in the config file to webmail.my.domain.com.
when I try to do a configtest.php in browser: webmail.my.domain.com/src/configtest.php
I get this error: 404 Not Found
The requested URL /src/configtest.php was not found on this server.
I am not sure how to get past this error. Any help would be appreciated.
Thanks.

Related

Laravel - created virtual host, however website will not connect to localhost

I am desperate for help. I am new to mac and Laravel. I have just installed a fresh project and Laravel and i am trying to create the virtual host, my code:
httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot “/Applications/XAMPP/htdocs”
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot “/Applications/XAMPP/htdocs/learninghub/public”
ServerName learninghub.local
</VirtualHost>
hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 learninghub.local
Getting the following error -
Object not found! The requested URL was not found on this server. If
you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.41 (Unix) OpenSSL/1.1.1c PHP/7.3.9
mod_perl/2.0.8-dev Perl/v5.16.3
Any help is greatly appreciated.
Referring to homebrew
Error: Failure while executing; git clone
https://github.com/Homebrew/homebrew-core
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core exited with
128.
Try with this:
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/htdocs/learninghub/public"
ServerName learninghub.local
ServerAlias *.learninghub.local
<Directory "/Applications/XAMPP/htdocs/learninghub/public">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
If you are on a Mac, I would highly suggest using Laravel Valet instead. Its a very compact development environment that uses Nginx and dnsmasq to serve your local projects with pretty URLs (*.test).
With Valet, you really don't have to fiddle with virtual hosts or edit your hosts file. You just add the directory where your projects live to Valet, and it will automagically serve them.

404 not found for virtual hosting url-laravel

I have a project c:/xampp/testadmin(laravel).I have created a virtual host for it.
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/testadmin/public"
SetEnv APPLICATION_ENV "development"
ServerName mywebsitename.com
ServerAlias mywebsitename.com
<Directory C:/xampp/htdocs/testadmin/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Actauly my mywebsitename.com
is a sub domain url. Now everything is okay and project is up.but problem is that when i hit mywebsitename.com/storage/app i got an error
Object not found!
The requested URL was not found on this server. If you entered the
URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
mywebsitename.com
Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.0
but when i hit localhost:8080/testadmin/storage/app it's working.and now my App-URL is mywebsitename.com.how can i solve this isuue?
Any help would be appreciated.

Serve Laravel app with Apache (wampserver) to access from other computers in same LAN

I need to access my Laravel app that is served with Apache (wampserver) from other computers in the same LAN.
OS: Windows 8.1
Wampserver version: 3.0.6
Apache version: 2.4.23
I can access my app from other computers by the following URL:
http://192.168.12.13/scms/public/
The following URLs also work:
http://192.168.12.13/scms/public/categories/create
But it does not work when I submit POST request from the above URL. It redirects to the following -
http://192.168.12.13/categories
And shows "Not Found". So, it does not work.
To solve the issue, I have setup virtual host for my app which works perfectly in my own computer. But I cannot access it from other computers.
My setup:
In file:
C:\wamp64\bin\apache\apache2.4.23\conf\httpd.conf
Added this line:
Listen 192.168.12.13:80
In file:
C:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf
Full code:
# Virtual Hosts
# wamp
<VirtualHost *:80>
DocumentRoot "C:\wamp64\www"
ServerName localhost
</VirtualHost>
# scms
<VirtualHost *:80>
DocumentRoot "C:\wamp64\www\scms\public"
ServerName local.scms-ananta.com
<Directory "C:\wamp64\www\scms\public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
In file:
C:\Windows\System32\drivers\etc\hosts
Added the following lines:
127.0.0.1 local.scms-ananta.com
192.168.12.13 local.scms-ananta.com
With the above setup, I can perfectly work with my app using the following URL in my own computer:
http://local.scms-ananta.com
But I cannot access it from other computers on my network.
Kindly note, serving with php artisan serve will not serve my purpose. I need to serve it with Apache.
Any help is highly appreciated.
First of all editing host file will not help you while accessing from other computer unless you also edit all of those PC's host file. So it would be best to access with IP.
Now problem with your configuration is that for serving/deploying laravel website in your server you have to put public folder as your document root.
Follwoing is your configuration for localhost
# wamp
<VirtualHost *:80>
DocumentRoot "C:\wamp64\www"
ServerName localhost
</VirtualHost>
Change the documentroot to the following will solve your problem.
DocumentRoot "C:\wamp64\www\scms\public"

Error when setting up VirtualHost in Wamp - The ServerName has syntax error in file httpd-vhosts.conf

I am trying to move a live wordpress website to a local site on my computer so that I can make changes and try things out without messing up the live site. I am using WAMP on a Win7 PC.
I went through all the steps...installed WAMP and downloaded my Wordpress files and my database file, put the wordpress files in the D:/wamp/www/site-name folder, I created a new database in phpadmin with the same name as my downloaded datebase, and imported my database, then I updated the URLS inside the database from http://www.site-name.org to localhost/site-name using the sql queries, then I updated the database name, username and password in the wp-config.pho file to reflect what is being used on the localhost versus the live site, then because I was using apache 2.4.x, I went to create a virtual host for my wordpress site because the localhost option was suppressed in the httpd.config file...and from what I gathered, the newer version is made to use virtual host, so I was attempting to do that, instead of unsupressing the localhost option.
So, I went to the the c/windows.system32/drivers/etc/hosts file and added the following
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost
# site-name name resolution
127.0.0.1 site_name #local version of website
::1 site_name
( note I had already checked the httpd.config file, and this line was already active:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Then, I went to the httpd-vhost.conf file and added in my new virtual host:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
#
<VirtualHost *:80>
ServerName site_name
ServerAlias site_name
DocumentRoot D:/wamp/www/site_name
<Directory "D:/wamp/www/site_name">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
However, after saving that, and restarting WAMP services, I continue to get an error for Site_name under Virtual host, that says: The ServerName site_name has syntax error in file D:/wamp/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf.
I have looked over the above code in the httpd-vhosts.conf for the site_name server, but can't find any syntax errors. The localhost virtual host works, and from what I can tell, the syntax for the site_name server is the same.
I tried running httpd.exe in the apache folder to see if it would give me more details on the syntax error, but I can't get it to run when double clicking on it, and I wasn't sure how to run it from the cmd prompt...I tried, but I kept getting some kind of socket error.
Thank you for the help.
Can someone please help be figure out what might be happening. What am I missing something?
You can't use underscore in host name.

how to Load subdomain like subdirectory in apache?

I am working on an android application witch connect to an web api written in php.
I setup a subdomain by this configuration in my httpd-vhost conf file:
<VirtualHost *:8080>
DocumentRoot "c:/wamp/www/Clinic"
ServerAlias Clinic.localhost
ServerName Clinic.localhost
<Directory "c:/wamp/www/Clinic">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
this setting work when I connect to that like this :
http://clinic.localhost:8080
but now I want to connect to this API from android device. there is no dns server and I must connect to this API by server IP now when I am trying to connect by this url:
http://192.168.1.102:8080/clinic
I get 404 error and my system cannot resolve host.
I found the reason. in my httpd-vhost config file i have not a virtual host for my root and because of this apache could not recognize host root folder. I add this config to my config file and every things is ok.
<VirtualHost *:8080>
DocumentRoot "c:/wamp/www"
ServerAlias localhost
ServerName localhost
</VirtualHost>

Categories