I download yii2_base and editing to my websit
Now, I upload mywebsit in directadmin
but when redirect my website all of folder yii2_base are show/
when enter web folder under errors is show:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/u697586846/public_html/web/index.php on line 12
I need help for:
How to delete folder web from url? domain.ir/web/.. >> domain.ir
How can I change my url
http://localhost/yii_mzh/web/index.php?r=news/shownews&id=5 to under
url: http://localhost/yii_mzh/web/index.php?r=news/shownews/id/5
Removing 'web' folder can be done by using proper .htaccess file if Aapche web server or nginx.conf web server if Nginx webserver (More info on config: Yii2 htaccess file)
Yii2 URL reconfiguring has been asked before and has been answered here Yii2 pretty URL
Related
I am struggling with this particular issue and cPanel's documentation really has not been any help.
This is a fresh setup of centOS7 (clean install) and cPanel for provisioning.
I am my own host - with a static IP.
I can login to cPanel on both common ports (2087 root and 2083 )
Ports 80,443,21,22 and 3306 are open
Here is my issue in a nutshell:
When I create an account in cPanel and then login as that account I can create a placeholder index.php file that simply just says "hi".
The problem is. After I edit the file once; if I try to create any other file or even edit the index.php file a second time? the domain will throw a 503 error. If I try to chmod the public_html folder in any way? cPanel throws a 503 error. If I try to extract my gitHub repo into the www folder? cPanel throws a 503 error.
The only way to fix it is to Terminate/Delete the account and then re-create it. So this is an endless loop of working/busted/working/busted.
The cPanel documentation has really been of zero help. Their support staff doesn't seem to have a clue either.
Is there a security setting I am missing? I have checked the log files. It is not giving me any info about why it is throwing an 503.
I have been going in circles for a day on this so any help is appreciated.
<?php
// Sample Placeholder Page
?>
<h1>This is a sample placeholder for cPanel</h1>
I expect that when editing a file such as index.php it should load properly.
The output is a 503 error after editing the file more than once or adding any other file.
The issue was caused by a corrupted PHP install by Easy Apache. Running a manual rebuild and switching from PHP 7.2 to 7.3 fixed the issue.
We have dedicated server, we move cpanel account from old server to new server.
All sites are working fine on new hosting but one of site which is static is not working.
Only index.html file is working is accessible, all other files (on faulty site ) like images, css, javascript etc gives 404 error. I have checked .htaccess, stop apache rewriting but no effect. It seem all request go to index.html ( only index.html is accessible).
In error logs I get only following error.
softException in Application.cpp:267: File
Caught race condition abuser. attacker: 513, victim: 0 open file
owner: 0, open file: /home/mysite/public_html/images/video-section.png
We have recreated site by removing account from cpanel, but facing same issue.
The ACME server was probably unable to reach http://mydomain/.well-known/acme-challenge/LLtRq6EdfBLmxyhzlFEqL
kDXBUFLsQbaea6A5kiJxIo
Check in a browser to see if the answer file is being served correctly.
This could be caused by IIS not being setup to handle extensionless static
files. Here's how to fix that:
1. In IIS manager goto Site/Server->Handler Mappings->View Ordered List
2. Move the StaticFile mapping above the ExtensionlessUrlHandler mappings.
(like this http://i.stack.imgur.com/nkvrL.png)
3. If you need to make changes to your web.config file, update the one
at C:\applications\letsencrypt\web_config.xml
Getting this error
While creatng ssl certifcate using letsencrypt
tried
1) If you can't browse to this configcheck file in your web browser (http://{your site}/.well-known/acme-challenge/configcheck then the Lets Encrypt service can't access the files it needs either.
=> configcheck is not getting created
You can edit the web.config file in this folder to get extensionless files working, then you can re-request your certificate. A mimeMap entry for either "." or ".*" usually works depending on your operating system version.
=> Edited web.config tried both "." or ".*"
No success
Can anyone please suggest steps to follow
i am using aws sever windows 2008 R2
If you have redirected your domain name from http to https
in virtual host of apache http.conf file
This will cause this issue
please comment that redirect and try it
Got solved
My local Apache server doesn't run my php file, instead the web browser downloads it when I try to view it. I'm using LAMP on Ubuntu. Would you help me how I can solve this problem? Thank!
Did you tell LAMP to handle .php files with the php5_module?
Check your current php setting by creating a new php file in the htdocs or www direectory with the following content:
<?php phpinfo(); ?>
This will show you if your webserver can process php files or not
I am looking for Apache httpd directive, that would immediately return some plaintext content ("System was not configured yet") or at least immediately generate 500 exception (so I can use ErrorDocument 500 'System was not configured yet').
Is there something I could use, or do I need to use some files on dics for this?
use this document :
The JK Connector is a web server component used to invisibly integrate Tomcat with a web server such as Apache or IIS. Communication between the web server and Tomcat is via the JK protocol (also known as the AJP protocol).
http://tomcat.apache.org/tomcat-4.1-doc/config/jk.html
Hope it can help you!
Edit:
you can also see this link:
http://www.viart.com/activating_friendly_urls.html.html
How to make a redirect to 404 custom page if fURLs are enabled
To make a redirect to a custom 404 page please do the following steps:
Login to your ViArt Shop Admin console.
Navigate to Administration > CMS > Custom Pages and create a 404 custom page
Click 'Update' to save the changes.
Access your site via any FTP client program and open your .htaccess file.
Insert the following string at the very beginning of the file:
ErrorDocument 404 /friendly_url.php
- Save the changes and upload the updated file to the root folder of your shop.
Open the file 'friendly_url.php' (located in the root folder) and find such a code:
$is_friendly_url = false;
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
exit;
-Replace this code with the following:
header("HTTP/1.0 200 OK");
header("Status: 200 OK");
set_get_param("page", '404');
include_once('page.php');
return;
where '404' is the name of your custom page as created in your ViArt shop Admin console.
Note: If you do not want to create a custom 404 page in your Admin panel please add the following code to your 'friendly_url.php' file:
$echo_string = implode("",file('http://example.com/404_text.txt'));
echo $echo_string;
exit;
where '404_text.txt' is any empty text file saved in the root folder of your shop.
Save the changes in the 'friendly_url.php' file and upload the updated file to the root folder of your shop.
Open your browser and type something like: http://example.com/404, where example.com equals your actual site URL and 404 is the name of your custom 404 page. If you did everything correctly you will see your 404 custom page.
Created a file for that plus error document setting for all possible URLs:
Alias /katello "/usr/share/katello/public/"
<Location /katello>
DirectoryIndex not_configured.txt
ErrorDocument 404 'Katello was not configured yet, please run katello-configure'
</Location>